diff --git a/app/assets/javascripts/app/lib/app_post/utils.js.coffee b/app/assets/javascripts/app/lib/app_post/utils.js.coffee index f008f1e90..a3096c1bc 100644 --- a/app/assets/javascripts/app/lib/app_post/utils.js.coffee +++ b/app/assets/javascripts/app/lib/app_post/utils.js.coffee @@ -114,6 +114,9 @@ class App.Utils # htmlOnlyWithRichtext = App.Utils.htmlRemoveRichtext( html ) @htmlRemoveRichtext: (html) -> + # remove comments + @_removeComments( html ) + # remove style and class @_removeAttributes( html ) @@ -130,6 +133,9 @@ class App.Utils # cleanHtmlWithRichText = App.Utils.htmlCleanup( html ) @htmlCleanup: (html) -> + # remove comments + @_removeComments( html ) + # remove style and class @_removeAttributes( html ) @@ -169,6 +175,13 @@ class App.Utils .removeAttr( 'title' ) html + @_removeComments: (html) -> + html.contents().each( -> + if @nodeType == 8 + $(@).remove() + ) + html + # signatureNeeded = App.Utils.signatureCheck( message, signature ) @signatureCheck: (message, signature) -> messageText = $( '