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

Does the pymoptions="" attribute actually support backslashes? #26

Open
benlk opened this issue Jun 23, 2017 · 0 comments
Open

Does the pymoptions="" attribute actually support backslashes? #26

benlk opened this issue Jun 23, 2017 · 0 comments

Comments

@benlk
Copy link
Collaborator

benlk commented Jun 23, 2017

We have this example in readme.txt:

[pym src="child.html" pymoptions=" xdomain: '\\*\.npr\.org' "]

Which is supposed to output: (with supporting code)

pym.Parent('pym_0', 'child.html', { xdomain: '*\.npr\.org' });

But what it actually puts on the page is this:

pym.Parent('pym_0', 'child.html', { xdomain: '\*.npr.org' })

Inside, the $pymoptions variable is this:

error_log( var_export( $pymoptions, true ) );
' xdomain: \'\\*.npr.org\' '

If we esc_js() that, it's this, still not what we're looking for:

' xdomain: \\\'*.npr.org\\\' '

In conclusion: slashes aren't being output correctly.

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