From b2824aced93d1cda1dd09635c6217be84fc80144 Mon Sep 17 00:00:00 2001 From: Simon Grim Date: Sun, 19 Jul 2015 04:10:59 +0500 Subject: [PATCH] post formatting for DM snippets --- js/twister_formatpost.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/js/twister_formatpost.js b/js/twister_formatpost.js index 93d30ed..d081026 100644 --- a/js/twister_formatpost.js +++ b/js/twister_formatpost.js @@ -8,7 +8,7 @@ var _htmlFormatMsgLinkTemplateUser; var _htmlFormatMsgLinkTemplateHashtag; $(document).ready(function() { - // we're setting it here for perfomance improvement purpose // to not search and prepare it for for every post + // we're setting it here for perfomance improvement purpose // to not search and prepare it for for every post every time _htmlFormatMsgLinkTemplateExternal = $('#external-page-link-template')[0].cloneNode(); _htmlFormatMsgLinkTemplateExternal.removeAttribute('id'); _htmlFormatMsgLinkTemplateUser = $('#msg-user-link-template')[0].cloneNode(); @@ -185,7 +185,7 @@ function dmDataToSnippetItem(dmData, remoteUser) { getGroupChatName( remoteUser, dmItem.find("a.post-info-name") ); else getFullname( remoteUser, dmItem.find("a.post-info-name") ); - dmItem.find(".post-text").html(escapeHtmlEntities(dmData.text)); + dmItem.find(".post-text").html(htmlFormatMsg(dmData.text)); dmItem.find(".post-info-time").text(timeGmtToText(dmData.time)).attr("title",timeSincePost(dmData.time)); return dmItem; @@ -652,4 +652,3 @@ function reverseHtmlEntities(str) { .replace(/'/g, "'") .replace(/&/g, '&'); } -