diff --git a/src/scripts/tutti/2_comments.js b/src/scripts/tutti/2_comments.js index 362f0d25..08e4dfd4 100644 --- a/src/scripts/tutti/2_comments.js +++ b/src/scripts/tutti/2_comments.js @@ -235,7 +235,7 @@ function commentEditCancel(clicked_item, reload_comment) { return loadComment(comment_id, {'properties.content': 1}) .done(function(data) { var comment_html = data['properties']['content_html']; - comment_container.find('.comment-body').html(comment_html); + comment_container.find('.comment-body span').html(comment_html); }) .fail(function(xhr) { if (console) console.log('Error fetching comment: ', xhr); diff --git a/src/templates/nodes/custom/comment/_macros.pug b/src/templates/nodes/custom/comment/_macros.pug index ff7e10d7..148b067d 100644 --- a/src/templates/nodes/custom/comment/_macros.pug +++ b/src/templates/nodes/custom/comment/_macros.pug @@ -11,7 +11,7 @@ .comment-body p.comment-author {{ comment._user.full_name }} - | {{comment.properties.content_html | safe }} + span {{comment.properties.content_html | safe }} // TODO: Markdown preview when editing diff --git a/src/templates/nodes/custom/comment/list_embed.pug b/src/templates/nodes/custom/comment/list_embed.pug index 58da1b6a..6d69de1d 100644 --- a/src/templates/nodes/custom/comment/list_embed.pug +++ b/src/templates/nodes/custom/comment/list_embed.pug @@ -154,7 +154,7 @@ script. var $parent_div = $(this).closest('.comment-container'); var comment_id = $parent_div.data('node-id'); - var comment_content = $parent_div.find('.comment-body'); + var comment_content = $parent_div.find('.comment-body span'); var height = comment_content.height(); loadComment(comment_id, {'properties.content': 1}) @@ -207,7 +207,7 @@ script. .done(function(comment_id, comment_html) { commentEditCancel($button, false) - $container.find('.comment-body') + $container.find('.comment-body span') .html(comment_html) .flashOnce();