Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gulp-dom wreaks havoc on html templates #56

Open
Tyguy7 opened this issue Apr 28, 2016 · 2 comments
Open

Gulp-dom wreaks havoc on html templates #56

Tyguy7 opened this issue Apr 28, 2016 · 2 comments

Comments

@Tyguy7
Copy link

Tyguy7 commented Apr 28, 2016

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.

@trygve-lie
Copy link
Owner

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.

@sharonsamsung
Copy link

sharonsamsung commented May 23, 2017

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants