html2dom icon indicating copy to clipboard operation
html2dom copied to clipboard

generates JavaScript source code to create Elements from a given html string

Results 3 html2dom issues
Sort by recently updated
recently updated
newest added

as per gareth's comments on twitter https://twitter.com/garethheyes/status/327362562444382208, we should not decode entities.

bug

in the function newAttribute you should replace val = encodeForAttribute(val); with this one: if (!((attr == "src") || (attr == "href"))) val = encodeForAttribute(val); Try html2dom with this string: '<...

html2dom emits code for text nodes that might contain redundant whitespaces, e.g. ``` js var text = document.createTextNode(" \n TITLE "); ``` The problem here is that we do not...

bug