toStandard //JavaScript Function
example:
s = '<INPUT type=text value="a b c" readonly x="123">blabla<DIV></DIV>'; prompt("", toStandard(s));
code:
//+ Jonas Raoni Soares Silva //@ http://jsfromhell.com function toStandard(s){ return s.replace(/<(\/?\w+)([^>]*)>/g, function(s, t, c, d){ return "<" + t.toLowerCase() + c.replace(/\b(\w+)(?:=((?:(?=(["'])).((?!\3)(?:.|\n))*\3)|\S*))?/g, function(s, p, v, a){ return (p = p.toLowerCase()) + "=" + (a = a ? "" : '"') + (v || p) + a; }) + ">"; }); };