Allow h1-h6 and hr for past in.
This commit is contained in:
parent
33cbbed774
commit
dc7c57575a
2 changed files with 4 additions and 7 deletions
|
@ -174,7 +174,7 @@ class App.Utils
|
|||
replacementTag = 'div';
|
||||
|
||||
# Replace all x tags with the type of replacementTag
|
||||
html.find('h1, h2, h3, h4, h5, h6, textarea').each( ->
|
||||
html.find('textarea').each( ->
|
||||
outer = @outerHTML;
|
||||
|
||||
# Replace opening tag
|
||||
|
@ -189,7 +189,7 @@ class App.Utils
|
|||
)
|
||||
|
||||
# remove tags & content
|
||||
html.find('font, hr, img, svg, input, select, button, style, applet, embed, noframes, canvas, script, frame, iframe, meta, link, title, head, fieldset').remove()
|
||||
html.find('font, img, svg, input, select, button, style, applet, embed, noframes, canvas, script, frame, iframe, meta, link, title, head, fieldset').remove()
|
||||
|
||||
html
|
||||
|
||||
|
|
|
@ -428,8 +428,7 @@ test("htmlCleanup", function() {
|
|||
equal(result.html(), should, source)
|
||||
|
||||
source = "<div><h1>some link to somewhere</h1></div>"
|
||||
//should = "<div><div>some link to somewhere</div></div>"
|
||||
should = "<div>some link to somewhere</div>"
|
||||
should = "<h1>some link to somewhere</h1>"
|
||||
result = App.Utils.htmlCleanup($(source))
|
||||
equal(result.html(), should, source)
|
||||
|
||||
|
@ -446,9 +445,7 @@ test("htmlCleanup", function() {
|
|||
equal(result.html(), should, source)
|
||||
|
||||
source = "<div><h1>some h1 for somewhere</h1><p><hr></p></div>"
|
||||
//should = "<div><div>some h1 for somewhere</div><p></p><p></p></div>"
|
||||
should = "<div>some h1 for somewhere</div><p></p><p></p>"
|
||||
//should = '<div>some h1 for somewhere</div>'
|
||||
should = "<h1>some h1 for somewhere</h1><p></p><hr><p></p>"
|
||||
result = App.Utils.htmlCleanup($(source))
|
||||
equal(result.html(), should, source)
|
||||
|
||||
|
|
Loading…
Reference in a new issue