summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-04-26 20:50:39 -0400
committerEvan Prodromou <evan@controlyourself.ca>2009-04-26 20:50:39 -0400
commitdb3b56a2fdf51e97e9859aa731674947571667aa (patch)
treeeec5d1d1baa33c0eaab7ca1b0281c85f5e0e2fb6
parente438334c00ebe29c01bfc5b02aa64cffdb43cb46 (diff)
Display rendered HTML for a notice
Display the rendered HTML for a notice
-rw-r--r--plugins/Comet/CometPlugin.php1
-rw-r--r--plugins/Comet/updatetimeline.js4
2 files changed, 4 insertions, 1 deletions
diff --git a/plugins/Comet/CometPlugin.php b/plugins/Comet/CometPlugin.php
index cff0d4c9d..2e0bb40a4 100644
--- a/plugins/Comet/CometPlugin.php
+++ b/plugins/Comet/CometPlugin.php
@@ -143,6 +143,7 @@ class CometPlugin extends Plugin
$arr = $act->twitter_status_array($notice, true);
$arr['url'] = $notice->bestUrl();
+ $arr['html'] = htmlspecialchars($notice->rendered);
$profile = $notice->getProfile();
$arr['user']['profile_url'] = $profile->profileurl;
diff --git a/plugins/Comet/updatetimeline.js b/plugins/Comet/updatetimeline.js
index c6eefb447..55511d35f 100644
--- a/plugins/Comet/updatetimeline.js
+++ b/plugins/Comet/updatetimeline.js
@@ -34,6 +34,8 @@ var updater = function()
function makeNoticeItem(data)
{
user = data['user'];
+ html = data['html'].replace(/&amp;/g,'&').replace(/&lt;/g,'<').replace(/&gt;/g,'>');
+
ni = "<li class=\"hentry notice\" id=\"notice-"+data['id']+"\">"+
"<div class=\"entry-title\">"+
"<span class=\"vcard author\">"+
@@ -42,7 +44,7 @@ var updater = function()
"<span class=\"nickname fn\">"+user['screen_name']+"</span>"+
"</a>"+
"</span>"+
- "<p class=\"entry-content\">"+data['text']+"</p>"+
+ "<p class=\"entry-content\">"+html+"</p>"+
"</div>"+
"<div class=\"entry-content\">"+
"<dl class=\"timestamp\">"+