Browse Source

Fixed #170 - wrap attributes of tags are not removed on "strg+alt+f".

Martin Edenhofer 8 years ago
parent
commit
4103aaa08a

+ 2 - 0
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
 

+ 5 - 0
public/assets/tests/html_utils.js

@@ -304,6 +304,11 @@ test("htmlRemoveTags", function() {
   result = App.Utils.htmlRemoveRichtext($(source))
   equal(result.html(), should, source)
 
+  source = "<div><p wrap=\"\">test 123</p></div>"
+  should = "<p>test 123</p>"
+  result = App.Utils.htmlRemoveRichtext($(source))
+  equal(result.html(), should, source)
+
   source = "<div><font size=\"3\" color=\"red\">This is some text!</font></div>"
   should = "This is some text!"
   result = App.Utils.htmlRemoveRichtext($(source))