MrAntix / jquery-clean

Automatically exported from code.google.com/p/jquery-clean

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

data-attributes are still being stripped out

GoogleCodeExporter opened this issue · comments

What steps will reproduce the problem?
1. copy htmlClean.js to the directory on the web-server
2. copy clean.html to the same directory
3. open clean.html in the browser

What is the expected output? What do you see instead?
data- attributes should be preserved

What version of the product are you using? On what operating system?
1.4.0 Ubuntu 13.10 Firefox

Please provide any additional information below.
if (tag.allowedAttributes != null && (tag.allowedAttributes.length == 0
    || $.inArray(attrMatch[1], tag.allowedAttributes) > -1)) {
    element.attributes.push(new Attribute(attrMatch[1], attrMatch[2]));
}
The attribute is found in attrMatch but is disallowed beause it is not allowed 
for particular tags. But data- is allowed on any HTML element.

Original issue reported on code.google.com by desmond....@gmail.com on 7 Apr 2014 at 1:53

Attachments: