mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 14:08:40 +08:00
FIX: prevent iframe in expended quote
This commit is contained in:
parent
a412c3016e
commit
38e0c6645e
@ -126,7 +126,9 @@ Discourse.PostView = Discourse.GroupedView.extend(Ember.Evented, {
|
|||||||
topicId = parseInt(topicId, 10);
|
topicId = parseInt(topicId, 10);
|
||||||
|
|
||||||
Discourse.ajax("/posts/by_number/" + topicId + "/" + postId).then(function (result) {
|
Discourse.ajax("/posts/by_number/" + topicId + "/" + postId).then(function (result) {
|
||||||
var parsed = $(result.cooked);
|
// slightly double escape the cooked html to prevent jQuery from unescaping it
|
||||||
|
var escaped = result.cooked.replace("&", "&");
|
||||||
|
var parsed = $(escaped);
|
||||||
parsed.replaceText(originalText, "<span class='highlighted'>" + originalText + "</span>");
|
parsed.replaceText(originalText, "<span class='highlighted'>" + originalText + "</span>");
|
||||||
$blockQuote.showHtml(parsed);
|
$blockQuote.showHtml(parsed);
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user