Comments (4)
I can confirm the same issue
from clean-html.
Sorry it's taken me a while to get around to looking at this. I'm a little rusty, so help me out. path
is a void element, right? Is it somehow different from other void elements, in that it needs the closing slash? In other words, <br>
and <br/>
are the same, but not <path>
and <path/>
?
from clean-html.
path
is not a void element (SVG is not HTML). https://www.w3.org/TR/html/syntax.html#writing-html-documents-elements
It can be self-closing, but the self-closing needs to be explicit for SVG paths. This Stack Overflow thread might be helpful: https://stackoverflow.com/a/31120364/631345
from clean-html.
I think this is a good use case for the new preserve-tags
option added in 6a1cc0d, e.g. --preserve-tags math,svg
.
I'll add those to the list of defaults.
from clean-html.
Related Issues (19)
- TypeError: Cannot read property 'forEach' of undefined HOT 3
- Maximum call stack exceeded HOT 9
- Conditional comments not handled
- CSS and JavaScript wrapping
- No hanging indent
- Multiline comment wrapping
- can clean-html remove empty attriubtes ? HOT 5
- working with patterns HOT 3
- why we remove script or style tag? HOT 3
- Generated HTML removed the <script> tag HOT 6
- Is the clean-html npm package legit? HOT 2
- How to remove all HTML 'attributes' or 'tags' EXCEPT a certain one (or two) HOT 2
- Return value HOT 2
- <script> get stripped from <head> HOT 5
- Allow more than one input file HOT 2
- Modernize the library (with TypeScript) HOT 2
- img tag gets removed when using remove-empty-tags HOT 2
- Remove pre/post whitespace within style attributes HOT 1
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 clean-html.