From: Zach Copley Date: Thu, 6 May 2010 07:55:17 +0000 (-0700) Subject: HTML entity encode source link URLs in plain XML output and add rel="nofollow" to... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=209fd12cd033c62619c68ac17a4fa70b1e981169;p=quix0rs-gnu-social.git HTML entity encode source link URLs in plain XML output and add rel="nofollow" to them --- diff --git a/actions/twitapisearchatom.php b/actions/twitapisearchatom.php index 3eb54ccc36..6c740c4902 100644 --- a/actions/twitapisearchatom.php +++ b/actions/twitapisearchatom.php @@ -349,7 +349,7 @@ class TwitapisearchatomAction extends ApiAction $ns = $notice->getSource(); if ($ns) { if (!empty($ns->name) && !empty($ns->url)) { - $source = '' . $ns->name . ''; + $source = '' . $ns->name . ''; } else { $source = $ns->code; } diff --git a/lib/apiaction.php b/lib/apiaction.php index 8c4dc6c262..2608be227a 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 = '' . $ns->name . ''; + $source = '' . $ns->name . ''; } else { $source = $ns->code; } } - $twitter_status['source'] = $source; + $twitter_status['source'] = htmlentities($source); $twitter_status['id'] = intval($notice->id); $replier_profile = null;