You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Verified the original example against published posthtml-render@3.0.0 and current master (280b2d3), using both parser 0.9.1 and 0.13.0.
The JSON attribute is now serialized correctly:
data-bem='{"button":{"checkedView":"extra"}}'
Reparsing preserves the complete JSON value, checkedView casing, the class list, and the original attribute names without introducing extra attributes.
The embedded-double-quote example from the later comment also works with the default options:
Activity
[-]parse obj in attrs[/-][+][fix]: parse obj in attrs[/+]ccorcos commentedon Jan 2, 2018
I can verify this.
ccorcos commentedon Jan 2, 2018
If you use v0.2.1 it works. This commit introduced the issue: posthtml/posthtml-parser@7e32484
Scrum commentedon Jan 4, 2018
may be
v3.1?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 commentedon Jan 4, 2018
Sounds like it needs to not be parsed. It shouldn't be unescaping those quotes and creating invalid html...
RReverser commentedon Aug 9, 2018
Not sure if the same issue, but currently PostHTML transforms HTML like
into
which creates security issues when executed on untrusted HTML.
voischev commentedon Nov 4, 2026
Verified the original example against published
posthtml-render@3.0.0and current master (280b2d3), using both parser 0.9.1 and 0.13.0.The JSON attribute is now serialized correctly:
data-bem='{"button":{"checkedView":"extra"}}'Reparsing preserves the complete JSON value,
checkedViewcasing, the class list, and the original attribute names without introducing extra attributes.The embedded-double-quote example from the later comment also works with the default options:
Reparsing this output retains a single
srcattribute with the original value.Closing the reported cases as fixed. The distinct remaining apostrophe-handling defect is tracked by #75.