Display rendered HTML for a notice
Display the rendered HTML for a notice
This commit is contained in:
parent
e438334c00
commit
db3b56a2fd
@ -143,6 +143,7 @@ class CometPlugin extends Plugin
|
|||||||
|
|
||||||
$arr = $act->twitter_status_array($notice, true);
|
$arr = $act->twitter_status_array($notice, true);
|
||||||
$arr['url'] = $notice->bestUrl();
|
$arr['url'] = $notice->bestUrl();
|
||||||
|
$arr['html'] = htmlspecialchars($notice->rendered);
|
||||||
|
|
||||||
$profile = $notice->getProfile();
|
$profile = $notice->getProfile();
|
||||||
$arr['user']['profile_url'] = $profile->profileurl;
|
$arr['user']['profile_url'] = $profile->profileurl;
|
||||||
|
@ -34,6 +34,8 @@ var updater = function()
|
|||||||
function makeNoticeItem(data)
|
function makeNoticeItem(data)
|
||||||
{
|
{
|
||||||
user = data['user'];
|
user = data['user'];
|
||||||
|
html = data['html'].replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>');
|
||||||
|
|
||||||
ni = "<li class=\"hentry notice\" id=\"notice-"+data['id']+"\">"+
|
ni = "<li class=\"hentry notice\" id=\"notice-"+data['id']+"\">"+
|
||||||
"<div class=\"entry-title\">"+
|
"<div class=\"entry-title\">"+
|
||||||
"<span class=\"vcard author\">"+
|
"<span class=\"vcard author\">"+
|
||||||
@ -42,7 +44,7 @@ var updater = function()
|
|||||||
"<span class=\"nickname fn\">"+user['screen_name']+"</span>"+
|
"<span class=\"nickname fn\">"+user['screen_name']+"</span>"+
|
||||||
"</a>"+
|
"</a>"+
|
||||||
"</span>"+
|
"</span>"+
|
||||||
"<p class=\"entry-content\">"+data['text']+"</p>"+
|
"<p class=\"entry-content\">"+html+"</p>"+
|
||||||
"</div>"+
|
"</div>"+
|
||||||
"<div class=\"entry-content\">"+
|
"<div class=\"entry-content\">"+
|
||||||
"<dl class=\"timestamp\">"+
|
"<dl class=\"timestamp\">"+
|
||||||
|
Loading…
Reference in New Issue
Block a user