FIX: Weird double escaping of `<` and `>` in quotes

This commit is contained in:
Robin Ward 2015-08-24 16:58:24 -04:00
parent f2db4bfcf3
commit 9c882795c3
1 changed files with 1 additions and 1 deletions

View File

@ -146,7 +146,7 @@ const PostView = Discourse.GroupedView.extend(Ember.Evented, {
Discourse.ajax("/posts/by_number/" + topicId + "/" + postId).then(function (result) {
// slightly double escape the cooked html to prevent jQuery from unescaping it
const escaped = result.cooked.replace("&", "&amp;");
const escaped = result.cooked.replace(/&[^gla]/, "&amp;");
const parsed = $(escaped);
parsed.replaceText(originalText, "<span class='highlighted'>" + originalText + "</span>");
$blockQuote.showHtml(parsed, 'fast', finished);