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

[fix]: parse obj in attrs #4

Open
voischev opened this issue Feb 17, 2016 · 5 comments
Open

[fix]: parse obj in attrs #4

voischev opened this issue Feb 17, 2016 · 5 comments
Assignees
Milestone

Comments

@voischev
Copy link
Member

input

<button class="button button_theme_alfa-on-white button_view_extra button_size_l button_type_submit button__control i-bem button_js_inited" data-bem="{&quot;button&quot;:{&quot;checkedView&quot;:&quot;extra&quot;}}" role="button" type="submit"><span class="button__text">Войти в интернет</span></button>

output

<button class="button button_theme_alfa-on-white button_view_extra button_size_l button_type_submit button__control i-bem" data-bem="{" button":{"checkedview":"extra"}}"="" role="button" type="submit"><span class="button__text">Войти в интернет</span></button>
@Scrum Scrum self-assigned this Dec 11, 2017
@Scrum Scrum changed the title parse obj in attrs [fix]: parse obj in attrs Dec 11, 2017
@Scrum Scrum added this to the 1.0.7 milestone Dec 11, 2017
@ccorcos
Copy link

ccorcos commented Jan 2, 2018

I can verify this.

@ccorcos
Copy link

ccorcos commented Jan 2, 2018

If you use v0.2.1 it works. This commit introduced the issue: posthtml/posthtml-parser@7e32484

@Scrum
Copy link
Member

Scrum commented Jan 4, 2018

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

@ccorcos
Copy link

ccorcos commented Jan 4, 2018

Sounds like it needs to not be parsed. It shouldn't be unescaping those quotes and creating invalid html...

@Scrum Scrum modified the milestones: 1.0.7, 1.0.8, 1.1.1 Jan 18, 2018
@RReverser
Copy link

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.

@Scrum Scrum modified the milestones: 1.1.2, 1.1.6 May 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants