Skip to content

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

Description

@benlk

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions