HTML entity encode source link URLs in plain XML output and add rel="nofollow" to them
This commit is contained in:
parent
292ea33dbd
commit
209fd12cd0
@ -349,7 +349,7 @@ class TwitapisearchatomAction extends ApiAction
|
||||
$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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user