Automattic / Automattic/pym-shortcode
Does the `pymoptions=""` attribute actually support backslashes?
- Dominant language
- PHP
- Stars
- 15
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
We have this example in readme.txt:
```
[pym src="child.html" pymoptions=" xdomain: '\\*\.npr\.org' "]
```
Which is supposed to output: (with supporting code)
```js
pym.Parent('pym_0', 'child.html', { xdomain: '*\.npr\.org' });
```
But what it actually puts on the page is this:
```js
pym.Parent('pym_0', 'child.html', { xdomain: '\*.npr.org' })
```
Inside, the `$pymoptions` variable is this:
```php
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.
Contributor guide
Assessment
This issue has not been assessed yet.