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

This commit is contained in:
Martin Edenhofer 2016-05-27 14:22:15 +02:00
parent 4196863b1a
commit 4103aaa08a
2 changed files with 7 additions and 0 deletions

View file

@ -208,6 +208,7 @@ class App.Utils
.removeAttr('lang') .removeAttr('lang')
.removeAttr('type') .removeAttr('type')
.removeAttr('id') .removeAttr('id')
.removeAttr('wrap')
.removeAttrs(/data-/) .removeAttrs(/data-/)
html html
.removeAttr('style') .removeAttr('style')
@ -216,6 +217,7 @@ class App.Utils
.removeAttr('lang') .removeAttr('lang')
.removeAttr('type') .removeAttr('type')
.removeAttr('id') .removeAttr('id')
.removeAttr('wrap')
.removeAttrs(/data-/) .removeAttrs(/data-/)
html html

View file

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