Discussion:
wordpress shortcode attribute escapes
Haluk Karamete
2014-05-25 18:47:27 UTC
Permalink
I'm very curious to see if there is a way to escape " and ] in the
following shortcode?

[my_shortcode my_variable=" Here is a double quote " and here is a right
bracket ] "][/my_shortcode]
surely, I could have opted in using a single quote (') as the my_variable's
string delimiters but that would not have satisfied my curiousity. :)

I tried \" and \\" , but that did not help.

Is the only way to use the html ascii entities here?
such as &#34 or " for the double quote case
and the ] or the right bracket case.

Loading...