Skip to content
Discussion options

You must be logged in to vote

I assume you printed the json without escaping it so you generated something like <div x-data="{"foo": "bar"}">.
That is going to confuse the browser because of the multiple quotes (it will think that x-data is just "{").

you can use htmlspecialchars to escape the string when printing it out.

If that's not the issue, you need to post the generated HTML so people can replicate and try to help.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@builtbybeluga
Comment options

@netdesignr
Comment options

@vdvcoder
Comment options

Answer selected by builtbybeluga
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants