-
Notifications
You must be signed in to change notification settings - Fork 30
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 'trusted-replace-node-text' — output literal quotes for escaped quotes #440
Comments
Somewhat related but different: #286 |
if single quotes are used to wrap a scriptlet parameter, the same single quote should be escaped inside the parameter:
|
So how to make
work? Adam proposed a workaround on Slack:
but this really is just a workaround and not the fundamental cure. |
Debug it via browser console, make it a valid JS function call:
|
I think that it's a correct issue. Simple steps to reproduce:
fiddle.jshell.net#%#//scriptlet('trusted-replace-node-text', 'script', 'alert', '/alert\(\'test\'\)/', 'alert(\'replaced\')')
<script>
alert('test');
</script> It should replaces |
Filters like
outputs literal
\'
and not'
so can't be used.The text was updated successfully, but these errors were encountered: