diff --git a/app/assets/javascripts/app/lib/app_post/utils.coffee b/app/assets/javascripts/app/lib/app_post/utils.coffee index a79fadd64..ff6737bab 100644 --- a/app/assets/javascripts/app/lib/app_post/utils.coffee +++ b/app/assets/javascripts/app/lib/app_post/utils.coffee @@ -208,6 +208,7 @@ class App.Utils .removeAttr('lang') .removeAttr('type') .removeAttr('id') + .removeAttr('wrap') .removeAttrs(/data-/) html .removeAttr('style') @@ -216,6 +217,7 @@ class App.Utils .removeAttr('lang') .removeAttr('type') .removeAttr('id') + .removeAttr('wrap') .removeAttrs(/data-/) html diff --git a/public/assets/tests/html_utils.js b/public/assets/tests/html_utils.js index 279ec546f..89e7bb8a9 100644 --- a/public/assets/tests/html_utils.js +++ b/public/assets/tests/html_utils.js @@ -304,6 +304,11 @@ test("htmlRemoveTags", function() { result = App.Utils.htmlRemoveRichtext($(source)) equal(result.html(), should, source) + source = "

test 123

" + should = "

test 123

" + result = App.Utils.htmlRemoveRichtext($(source)) + equal(result.html(), should, source) + source = "
This is some text!
" should = "This is some text!" result = App.Utils.htmlRemoveRichtext($(source))