I'm trying to escape a single quote '
in a string to be passed as argument to a component method function call.
In my template I'm printing (using php function htmlentities
with ENT_QUOTES
) something like:
<button
@click.prevent="test('own's')">
Test
</button>
But seems that the html entity breaks vuejs parsing.
Here is the fiddle demo https://jsfiddle.net/76ueL3f8/1/
How can I securely escape the argument in php?
Thanks!