.HTML() method does not support HTML that contains % signs or periods
jmonroe opened this issue · comments
Example....
var markup = "<li id='help' style='width: 33%;'> help </li>"
x$(#testing).html('bottom', markup)
This results in the width property not being applied due to the percent sign.
var markup = "<li id='help' style='width: 33.3333%;'> help </li>"
x$(#testing).html('bottom', markup)
This also does not work even after fixing the % issue because the regex split does not accommodate periods either.
The problem can be fixed by modifying line 195 of DOM.JS
It is currently
attrList = result[2].split(/([A-Z-]\s=\s_['|"][A-Z0-9:;#\s]['|"])/i);
I corrected the issue by changing it to
attrList = result[2].split(/([A-Z-]\s_=\s_['|"][A-Z0-9:;#%.\s]_['|"])/i);