p4ulypops / jquery-clean

Automatically exported from code.google.com/p/jquery-clean
0 stars 0 forks source link

You can't allow iframe tag #29

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. var opt = {allowedTags: ['iframe,'...], removeTags:[]}
2. run htmlClean(htmlCodeWithIframe, opt)
3. iframe tags are not kept

What is the expected output? What do you see instead?
jquery-clean still remove iframe tags..

What version of the product are you using? On what operating system?
vers. 1.3.0 

Please provide any additional information below.

It's possible to allow iframe by editing some internal variables 
(tagInline,tagAllowEmpty,tagAttributes)... 

Original issue reported on code.google.com by giusepp...@gmail.com on 20 Jun 2013 at 10:08

GoogleCodeExporter commented 9 years ago
Would you like to propose a fix?

I'll have a look as soon as I can

Original comment by antixsof...@gmail.com on 21 Jun 2013 at 8:17

GoogleCodeExporter commented 9 years ago
Thanks for submitting the issue in any case :)

Original comment by antixsof...@gmail.com on 21 Jun 2013 at 8:18

GoogleCodeExporter commented 9 years ago
For my needs, I added 'iframe' tag in the internal variables "tagInline" and 
"tagAllowEmpty" and I also added the row
'iframe', ['src','width','height','style']
in the "tagAttributes" variable..

Original comment by giusepp...@gmail.com on 24 Jun 2013 at 11:13

GoogleCodeExporter commented 9 years ago

Original comment by antixsof...@gmail.com on 11 Jul 2013 at 9:45

GoogleCodeExporter commented 9 years ago
Hi guiseppe85

I've added support for iframes now
you have to tell it not to remove them by changing the default removeTags 
options
e.g.

    {                
        removeTags: ["basefont", "center", "dir", "font", "frame", "frameset", "isindex", "menu", "noframes", "s", "strike", "u"]
    }

here I have taken iframe out of the list

Original comment by antixsof...@gmail.com on 11 Jul 2013 at 10:45