p4ulypops / jquery-clean

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

adding attributes to td, th tags #6

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. In tagAttributes, add "colspan" as an allowed attribute to either td or th 
tags (on the plugin JS file)
2. Run clean on some passed html
3. colspan attributes are not kept

What is the expected output? What do you see instead?
td and th tags keep "colspan" attributes

What version of the product are you using? On what operating system?
version 1.2.0, on windows server 2003 rc2

Please provide any additional information below.

Original issue reported on code.google.com by scot.wal...@gmail.com on 6 Jul 2010 at 12:21

GoogleCodeExporter commented 9 years ago
Hi Scot,

Try adding the following lines at 494
            "th", ["class", "colspan", "rowspan"],
            "td", ["class", "colspan", "rowspan"],

this will render the colspan and rowspan should you need it

I think this should be in the js as it would change the structure of a table if 
they were removed. I will be updating the library with these changes, but need 
a bit of time to test. 

In the meantime you can patch as above.
Ant

Original comment by antixsof...@gmail.com on 6 Jul 2010 at 7:01

GoogleCodeExporter commented 9 years ago
Yup, that was what I had done - but I did find the problem which was pretty 
unrelated :S.

The attributes are case sensitive. The html being cleaned had "colSpan" as the 
attribute, I updated the plugin with "colspan".

Changed it to "colSpan" in the plugin and all was working perfectly.

hrm!

Thanks anyway and keep up the good work :)

Original comment by scot.wal...@gmail.com on 6 Jul 2010 at 7:49

GoogleCodeExporter commented 9 years ago
this is done

Original comment by antixsof...@gmail.com on 30 Apr 2012 at 6:29