From: Evan Prodromou Date: Mon, 27 Apr 2009 00:50:39 +0000 (-0400) Subject: Display rendered HTML for a notice X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=db3b56a2fdf51e97e9859aa731674947571667aa;p=quix0rs-gnu-social.git Display rendered HTML for a notice Display the rendered HTML for a notice --- diff --git a/plugins/Comet/CometPlugin.php b/plugins/Comet/CometPlugin.php index cff0d4c9d6..2e0bb40a46 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 c6eefb4475..55511d35ff 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(/&/g,'&').replace(/</g,'<').replace(/>/g,'>'); + ni = "
  • "+ "
    "+ ""+ @@ -42,7 +44,7 @@ var updater = function() ""+user['screen_name']+""+ ""+ ""+ - "

    "+data['text']+"

    "+ + "

    "+html+"

    "+ "
    "+ "
    "+ "
    "+