catalog: use copy of comment HTML from before running features like Linkify/Embed
This commit is contained in:
parent
8a29978882
commit
58973e4651
@ -353,7 +353,7 @@ Build =
|
||||
'<span class="thread-icons"></span>' +
|
||||
'</div>' +
|
||||
'&{subject}' +
|
||||
'<div class="comment">&{thread.OP.nodes.comment}</div>'
|
||||
'<div class="comment">&{thread.OP.info.commentHTML}</div>'
|
||||
) %>
|
||||
|
||||
root.dataset.fullID = thread.fullID
|
||||
|
||||
@ -86,6 +86,7 @@ class Post
|
||||
parseComment: ->
|
||||
# Merge text nodes and remove empty ones.
|
||||
@nodes.comment.normalize()
|
||||
|
||||
# Get the comment's text.
|
||||
# <br> -> \n
|
||||
# Remove:
|
||||
@ -98,7 +99,11 @@ class Post
|
||||
for node in $$ '.abbr, .exif, b', bq
|
||||
$.rm node
|
||||
@info.comment = @nodesToText bq
|
||||
# Hide spoilers.
|
||||
|
||||
# Save cleaned comment HTML.
|
||||
@info.commentHTML = <%= html('&{bq}') %>
|
||||
|
||||
# Get the comment's text with spoilers hidden.
|
||||
spoilers = $$ 's', bq
|
||||
@info.commentSpoilered = if spoilers.length
|
||||
for node in spoilers
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user