Comments (5)
Not sure if the same issue, but currently PostHTML transforms HTML like
<img src='1" onload="alert()'>
into
<img src="1" onerror="alert()">
which creates security issues when executed on untrusted HTML.
from posthtml-render.
I can verify this.
from posthtml-render.
If you use v0.2.1 it works. This commit introduced the issue: posthtml/posthtml-parser@7e32484
from posthtml-render.
v0.2.1
may be v3.1
?
If you use v0.2.1 it works.
Yes it works but maybe I hurried up. it probably does not need to be parsed but it's only necessary to transform it with the renderer and all this should most likely be options
from posthtml-render.
Sounds like it needs to not be parsed. It shouldn't be unescaping those quotes and creating invalid html...
from posthtml-render.
Related Issues (20)
- Loss of attributes without values HOT 2
- [fix]: uglifyjs: not found
- [fix]: Component tag handling HOT 2
- [fix]: cut out content with options closingSingleTag: 'slash'
- [fix]: Multiply RegExp Single tags HOT 1
- Breaking change - node version in bugfix release HOT 8
- singleTags won't work regular expression
- Changing invalid markup parsing behavior HOT 5
- Missing TypeScript definition HOT 3
- [fix]: php code sometimes gets mangled HOT 1
- JSON in data attributes have double quotes converted to " HOT 1
- Case sensitivity breaks empty elements HOT 1
- Won't render AST straight from the parser... HOT 1
- PostHTML 0.16 regression with <style> HOT 1
- Broken on latest posthtml (0.16+) HOT 10
- TypeScript index.d.ts referenced incorrectly in package.json
- Node type not exported HOT 1
- options dose not working HOT 5
- Space added to quotes in attribute (with replaceQuote disabled) HOT 2
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 posthtml-render.