End Tag (/) removed from <link>
See original GitHub issueResubmitting as per Gulp User Suggestion.(https://github.com/gulpjs/gulp/issues/639)
We use HTML 5 based template engine (Thymeleaf), which will use strict mode to validate HTML documents. In short, At run time, they validate whether all HTML tags are closed properly like in XMLs. Consider we have below code inside our HTML
<link rel="stylesheet" href="styles/main.css"/>
Once I run gulp build ( i used generator-gulp-angular), I noticed that, in the dist folder, the above HTML code becomes
<link rel="stylesheet" href="styles/main.css">
without the ‘/’ at the end which will be considered as unclosed tag.
Issue Analytics
- State:
- Created 9 years ago
- Comments:8 (1 by maintainers)
Top Results From Across the Web
Web scraping URL contains </a> end tag at the end how to ...
Although I'm using plaintext to just scrape a text, it has </a> end tag. How can I remove it? php · html ...
Read more >End Tag (/) removed from <link> · Issue #639 · gulpjs/gulp · GitHub
In short, At run time, they validate whether all HTML tags are closed properly like in XMLs. ... End Tag (/) removed from...
Read more >Should the HTML link tag be self-closing or not? - Codecademy
Over at W3schools they say that it should be self-closed like this: But over here at Codeacademy the editor warns me about it...
Read more >Tags used in HTML
HTML Tags. This is a list of tags used in the HTML language. Each tag starts with a tag opener (a less than...
Read more >strip_tags - Manual - PHP
strip_tags — Strip HTML and PHP tags from a string ... "5.3.4 strip_tags() no longer strips self-closing XHTML tags unless the self-closing XHTML...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
While I agree with @jedmao regarding the HTML5 specs, sometimes reality catches us. I have the same problem with an application using XHTML. I found a workaround, using
gulp-replace
and a regexp :+1