From 58973e465172e4b7baced47e4f9369377004011a Mon Sep 17 00:00:00 2001 From: ccd0 Date: Tue, 16 Sep 2014 19:42:45 -0700 Subject: [PATCH] catalog: use copy of comment HTML from before running features like Linkify/Embed --- src/General/Build.coffee | 2 +- src/General/lib/post.class | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/General/Build.coffee b/src/General/Build.coffee index 9aef30f6d..d9a2dafdd 100755 --- a/src/General/Build.coffee +++ b/src/General/Build.coffee @@ -353,7 +353,7 @@ Build = '' + '' + '&{subject}' + - '
&{thread.OP.nodes.comment}
' + '
&{thread.OP.info.commentHTML}
' ) %> root.dataset.fullID = thread.fullID diff --git a/src/General/lib/post.class b/src/General/lib/post.class index 1eb61f645..645f0894e 100755 --- a/src/General/lib/post.class +++ b/src/General/lib/post.class @@ -86,6 +86,7 @@ class Post parseComment: -> # Merge text nodes and remove empty ones. @nodes.comment.normalize() + # Get the comment's text. #
-> \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