diff options
author | Zach Copley <zach@status.net> | 2010-05-06 00:55:17 -0700 |
---|---|---|
committer | Zach Copley <zach@status.net> | 2010-05-06 21:48:12 +0000 |
commit | 209fd12cd033c62619c68ac17a4fa70b1e981169 (patch) | |
tree | 77b9f0bc37b5055855855543dfd28ac9d04581c0 /lib/apiaction.php | |
parent | 292ea33dbddeee881474b8f98507213a7d8c159c (diff) |
HTML entity encode source link URLs in plain XML output and add rel="nofollow" to them
Diffstat (limited to 'lib/apiaction.php')
-rw-r--r-- | lib/apiaction.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/apiaction.php b/lib/apiaction.php index 8c4dc6c26..2608be227 100644 --- a/lib/apiaction.php +++ b/lib/apiaction.php @@ -319,13 +319,13 @@ class ApiAction extends Action $ns = $notice->getSource(); if ($ns) { if (!empty($ns->name) && !empty($ns->url)) { - $source = '<a href="' . $ns->url . '">' . $ns->name . '</a>'; + $source = '<a href="' . $ns->url . '" rel="nofollow">' . $ns->name . '</a>'; } else { $source = $ns->code; } } - $twitter_status['source'] = $source; + $twitter_status['source'] = htmlentities($source); $twitter_status['id'] = intval($notice->id); $replier_profile = null; |