Remove errant double HTML entity encoding in API source attribution
This commit is contained in:
parent
ee8c9d1422
commit
869bc32d0d
@ -349,14 +349,17 @@ class TwitapisearchatomAction extends ApiAction
|
|||||||
$ns = $notice->getSource();
|
$ns = $notice->getSource();
|
||||||
if ($ns) {
|
if ($ns) {
|
||||||
if (!empty($ns->name) && !empty($ns->url)) {
|
if (!empty($ns->name) && !empty($ns->url)) {
|
||||||
$source = '<a href="' . $ns->url . '" rel="nofollow">' . $ns->name . '</a>';
|
$source = '<a href="'
|
||||||
|
. htmlspecialchars($ns->url)
|
||||||
|
. '" rel="nofollow">'
|
||||||
|
. htmlspecialchars($ns->name)
|
||||||
|
. '</a>';
|
||||||
} else {
|
} else {
|
||||||
$source = $ns->code;
|
$source = $ns->code;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->element("twitter:source", null,
|
$this->element("twitter:source", null, $source);
|
||||||
htmlentities($source));
|
|
||||||
|
|
||||||
$this->elementStart('author');
|
$this->elementStart('author');
|
||||||
|
|
||||||
|
@ -1221,7 +1221,7 @@ class Notice extends Memcached_DataObject
|
|||||||
$ns = $this->getSource();
|
$ns = $this->getSource();
|
||||||
if ($ns) {
|
if ($ns) {
|
||||||
if (!empty($ns->url)) {
|
if (!empty($ns->url)) {
|
||||||
$noticeInfoAttr['source_link'] = htmlentities($ns->url);
|
$noticeInfoAttr['source_link'] = $ns->url;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -319,13 +319,17 @@ class ApiAction extends Action
|
|||||||
$ns = $notice->getSource();
|
$ns = $notice->getSource();
|
||||||
if ($ns) {
|
if ($ns) {
|
||||||
if (!empty($ns->name) && !empty($ns->url)) {
|
if (!empty($ns->name) && !empty($ns->url)) {
|
||||||
$source = '<a href="' . $ns->url . '" rel="nofollow">' . $ns->name . '</a>';
|
$source = '<a href="'
|
||||||
|
. htmlspecialchars($ns->url)
|
||||||
|
. '" rel="nofollow">'
|
||||||
|
. htmlspecialchars($ns->name)
|
||||||
|
. '</a>';
|
||||||
} else {
|
} else {
|
||||||
$source = $ns->code;
|
$source = $ns->code;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$twitter_status['source'] = htmlentities($source);
|
$twitter_status['source'] = $source;
|
||||||
$twitter_status['id'] = intval($notice->id);
|
$twitter_status['id'] = intval($notice->id);
|
||||||
|
|
||||||
$replier_profile = null;
|
$replier_profile = null;
|
||||||
|
Loading…
Reference in New Issue
Block a user