From: Zach Copley Date: Thu, 6 May 2010 21:36:13 +0000 (+0000) Subject: Remove errant double HTML entity encoding in API source attribution X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=869bc32d0d8cd68d75483e33c62d8ea9f1cc8e2c;p=quix0rs-gnu-social.git Remove errant double HTML entity encoding in API source attribution --- diff --git a/actions/twitapisearchatom.php b/actions/twitapisearchatom.php index 6c740c4902..51e8a8881b 100644 --- a/actions/twitapisearchatom.php +++ b/actions/twitapisearchatom.php @@ -349,14 +349,17 @@ class TwitapisearchatomAction extends ApiAction $ns = $notice->getSource(); if ($ns) { if (!empty($ns->name) && !empty($ns->url)) { - $source = '' . $ns->name . ''; + $source = '' + . htmlspecialchars($ns->name) + . ''; } else { $source = $ns->code; } } - $this->element("twitter:source", null, - htmlentities($source)); + $this->element("twitter:source", null, $source); $this->elementStart('author'); diff --git a/classes/Notice.php b/classes/Notice.php index b3cfb28138..875bcaa020 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -1221,7 +1221,7 @@ class Notice extends Memcached_DataObject $ns = $this->getSource(); if ($ns) { if (!empty($ns->url)) { - $noticeInfoAttr['source_link'] = htmlentities($ns->url); + $noticeInfoAttr['source_link'] = $ns->url; } } diff --git a/lib/apiaction.php b/lib/apiaction.php index 2608be227a..42aa08ef7d 100644 --- a/lib/apiaction.php +++ b/lib/apiaction.php @@ -319,13 +319,17 @@ class ApiAction extends Action $ns = $notice->getSource(); if ($ns) { if (!empty($ns->name) && !empty($ns->url)) { - $source = '' . $ns->name . ''; + $source = '' + . htmlspecialchars($ns->name) + . ''; } else { $source = $ns->code; } } - $twitter_status['source'] = htmlentities($source); + $twitter_status['source'] = $source; $twitter_status['id'] = intval($notice->id); $replier_profile = null;