gulp-dom icon indicating copy to clipboard operation
gulp-dom copied to clipboard

Gulp-dom wreaks havoc on html templates

Open Tyguy7 opened this issue 9 years ago • 2 comments

Gulp modifies areas of the dom that you don't ask it to. It tries to correct "missing" attributes and also html encodes many characters like greater than and less than. This behavior makes it impossible to use with html templates. Gulp-dom should only modify the elements that it is told to.

Tyguy7 avatar Apr 28 '16 04:04 Tyguy7

Could you please provide a somewhat condensed example displaying this? At least a wrong output?

When that is said, this module are just a gulp wrapper around the jsdom which does all the tokenizing and parsing and in this process it will correct faulty html according to the given html spec.

trygve-lie avatar May 01 '16 18:05 trygve-lie

I have similar issue. Is this solved? For example, I don't have < html >< body > tags in my html file (since it's just a template, those tags are not needed), but after I use gulp-dom to modify one span, the above tags (< html >, < body >, etc) are added automatically. Is there any way to disable this?

sharonsamsung avatar May 23 '17 18:05 sharonsamsung