javascript - How to filter deprecated HTML elements with jQuery -
i'm aware can use filter() select html elements dom. in order make sure html following current html5 standards, replace elements <u> or bit more exotic <strike /> current standard counterparts or remove them @ all, appropriate. do
$('strike, s').each(function(index){ $(this).replacewith('<span>'+$(this).contents()+'</span>').css('text-decoration','line-through'); }); my question: there way select non-valid or deprecated without explictly enumerating them in selector? impossible if uses custom tag <mytag /> or so? thinking of making use of dtd's wouldn't know efficient way so?
this used node server-side optimize html.
Comments
Post a Comment