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

Use tidy with json custom attributes on custom components #677

Closed
saulzini opened this issue Feb 16, 2018 · 2 comments
Closed

Use tidy with json custom attributes on custom components #677

saulzini opened this issue Feb 16, 2018 · 2 comments

Comments

@saulzini
Copy link

saulzini commented Feb 16, 2018

Hello @geoffmcl, I want to know if there is a way to tell tidy to ignore custom attributes on custom components ?

Notice the ':' before the attribute.

Something like this using json_encode,htmlspecialchars or not:
<order-details-table :element=" {&quot;test&quot;:&quot;test&quot;} " ></order-details-table>

or like this
<order-details-table :element=" {"test":"test"} "></order-details-table>

Because tidy is giving this result
<order-details-table ></order-details-table>
In advance, thank you :)

@geoffmcl
Copy link
Contributor

@saulzini unfortunately I know of no way to "tell tidy to ignore custom attributes on custom components"...

HTML Tidy is a HTML/XHTML parser, certainly not a json parser.

Given the current tidy html attribute="value" parsing, things like you suggest :element=" {"test":"test"} ", escaped or not, will always be invalid...

In other words there are some things HTML Tidy can not do, and is unlikely to ever do... sorry...

@geoffmcl
Copy link
Contributor

geoffmcl commented Oct 7, 2020

20201007:

@saulzini feel question asked, and answered, so closing this...

Please feel free to re-open, with discussion, or open a new issue... thanks...

@geoffmcl geoffmcl closed this as completed Oct 7, 2020
@geoffmcl geoffmcl removed this from the 5.7 milestone Oct 7, 2020
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

2 participants