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

Escaping brackets in shortcode attribute does not work #779

Open
montchr opened this issue Oct 12, 2017 · 0 comments
Open

Escaping brackets in shortcode attribute does not work #779

montchr opened this issue Oct 12, 2017 · 0 comments
Labels

Comments

@montchr
Copy link

montchr commented Oct 12, 2017

We have a shortcode that needs to support brackets appearing in one of its attributes. The use case is for a pull quote with words in the quote paraphrased with brackets.

As mentioned in this Trac ticket from 10 years ago, brackets can be escaped by using double brackets [[ and ]]. This works in text mode of the editor, but upon switching to visual mode the shortcode terminates prematurely at the first appearance of ].

For example:

// Desired markup
[pullquote content="This is another way to integrate [the public library] into people's lives" align="right" credit="Community Health Librarian" /]

// Escaping markup
[pullquote content="This is another way to integrate [[the public library]] into people's lives" align="right" credit="Community Health Librarian" /]

// Resulting markup
[pullquote content="This is another way to integrate [[the public library]

] into people's lives" align="right" credit="Community Health Librarian" /]

We are using Shortcake Bakery to register this shortcode so it's possible the issue lies with that plugin and not this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants