Comments (1)
I think lol-html is correct, here. HTML (5, at least) doesn't have self-closing tags. <span/>
isn't a self-closing span, it's an opening span with a /
that gets ignored. In devtools, try adding <span/>
to the middle of some text and see how the browser interprets it.
HTML5 only allows for self-closing tags in embedded foreign content (SVGs, MathML, etc). Void elements are the HTML5 version of self-closing tags, being tags with no closing tag such as meta
and base
. They don't require a /
though if one is present it will be ignored. <meta> ==
`
from lol-html.
Related Issues (20)
- Detecting void elements HOT 3
- build fails for cssparser HOT 2
- Make `Element.on_end_tag` handler `'h` instead of `'static`
- Fails to rewrite simple html image tag HOT 4
- [Feature Request] Support XML parsing HOT 1
- release 1.2.0 not tagged on git
- bring back lockfiles for bindings HOT 1
- [Question/Request] Guarantees around the bytes emitted into the `OutputSink` HOT 2
- Provide way to get document position information for start and end tags HOT 1
- Evaluate using Profile-Guided Optimization (PGO) and Post-Link Optimization (PLO)
- 1st
- rewriter.end() self is non reference HOT 2
- Support for `Element::add_attribute` HOT 2
- Elements within `<noscript>` cannot be rewritten
- Replace strips what comes after the tag HOT 2
- Looser syntax for RSS feeds?
- How to extract inner HTML of an element? HOT 2
- HTMLRewriter’s element.setAttribute() method alters the surrounding single quote character
- replace()-ing or remove()-ing self-closing tags breaks outputted markup HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lol-html.