Title: Escape code does not works
Last modified: January 9, 2020

---

# Escape code does not works

 *  Resolved [innocenat](https://wordpress.org/support/users/innocenat/)
 * (@innocenat)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/escape-code-does-not-works/)
 * Not sure if this is Shortcoder problem or WordPress problem, but since it broke
   after I upgraded shortcoder.
 * I am currently unable do escape, i.e. [[sc name=”…”]] in my code. It just display[
   and the shortcode content. This kinda broke our internal page that guide our 
   author how to use such shortcode.

Viewing 11 replies - 1 through 11 (of 11 total)

 *  Plugin Author [vaakash](https://wordpress.org/support/users/vaakash/)
 * (@vaakash)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/escape-code-does-not-works/#post-12309090)
 * [@innocenat](https://wordpress.org/support/users/innocenat/),
 * hmm.. do you mean you want to display the shortcode syntax as is without executing?
 * Any screenshots to explain will be better.
 *  Thread Starter [innocenat](https://wordpress.org/support/users/innocenat/)
 * (@innocenat)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/escape-code-does-not-works/#post-12309133)
 * I have content like this (sorry it’s not in English): [https://imgur.com/9zQ3jIg](https://imgur.com/9zQ3jIg)(
   Picture from WP’s TinyMCE editor)
 * [ ](https://codex.wordpress.org/) for escaping shortcode seems to be WordPress
   standard so I am not sure if it’s WordPress problem or Shortcover V5 problem.
   But previously, when I type [[sc name=”XXX”]] like in the pictured, it would 
   get displayed as [sc name=”XXX] without the shortcode executing.
 * I seems to have narrowed down the problem. This problem (escaping with [ ](https://codex.wordpress.org/)
   does not work) only occurs when there are shortcode with enclosed contents that
   come after the escaped shortcodes. Sorry, I am not really sure if this is wordpress
   or shortcoder bugs. It may have existed before V5 as well.
    -  This reply was modified 6 years, 3 months ago by [innocenat](https://wordpress.org/support/users/innocenat/).
 *  Plugin Author [vaakash](https://wordpress.org/support/users/vaakash/)
 * (@vaakash)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/escape-code-does-not-works/#post-12309160)
 * Ok, so if you want to display the shortcode as is without executing then the 
   proper way would be use like below and not double square brackets AFAIK.
 * `&#091;sc name="your-shortcode-name" &#093;`
 * Using `&#091;` would print `[` as is.
 *  Thread Starter [innocenat](https://wordpress.org/support/users/innocenat/)
 * (@innocenat)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/escape-code-does-not-works/#post-12309187)
 * You should put that somewhere in your documentation then. Most of the google 
   result for escaping WordPress shortcode will suggest double bracket (it’s included
   in WP Core since version 2.5: [https://core.trac.wordpress.org/ticket/6518](https://core.trac.wordpress.org/ticket/6518))
 * I guess I will see if I could modify the plugin. I have way too many pages written
   with double bracket.
 * Thank you.
    -  This reply was modified 6 years, 3 months ago by [innocenat](https://wordpress.org/support/users/innocenat/).
 *  Plugin Author [vaakash](https://wordpress.org/support/users/vaakash/)
 * (@vaakash)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/escape-code-does-not-works/#post-12309230)
 * hmm… It can be documented. But I don’t see any reason why any normal user should
   print the shortcode syntax as is without executing.
 * I guess you had a reason. But this is not something related to shortcoder. Any
   shortcode you want to print as is, you have to escape the character to its respective
   HTML entity as in the table. [https://www.freeformatter.com/html-entities.html](https://www.freeformatter.com/html-entities.html)
 * Cheers !
 * Thanks,
    Aakash
 *  Thread Starter [innocenat](https://wordpress.org/support/users/innocenat/)
 * (@innocenat)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/escape-code-does-not-works/#post-12309252)
 * While I understand that it might be a hassle to support, it is related in a sense
   that double bracket escape **is** the standard way of escaping shortcode in WordPress.
   And it works fine with shortcoder too if no enclosed content shortcode is used.
 * As for why normal user would do, as I said in my other comment, it is used in
   in contributor guideline telling website contributors how to use various shortcode
   to format their posts.
 * I assume that the enclosed content feature uses custom shortcode parser and that
   might be hard to fix, and I respect that.
    -  This reply was modified 6 years, 3 months ago by [innocenat](https://wordpress.org/support/users/innocenat/).
 *  Plugin Author [vaakash](https://wordpress.org/support/users/vaakash/)
 * (@vaakash)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/escape-code-does-not-works/#post-12309270)
 * I understand your scenario. Anyways I’m not sure if the ticket you pointed is
   still relevant. I simply use the one I told in my shortcoder documenation like
   in this discussion [https://wordpress.stackexchange.com/questions/33960/how-do-i-escape-a-in-a-short-code](https://wordpress.stackexchange.com/questions/33960/how-do-i-escape-a-in-a-short-code)
 * It is not as easy to write as double square brackets but will and always work.
 * Thanks,
    Aakash
 *  Thread Starter [innocenat](https://wordpress.org/support/users/innocenat/)
 * (@innocenat)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/escape-code-does-not-works/#post-12309309)
 * That doesn’t really work when you have contributor that doesn’t really want to
   touch the code tab.
 * I guess I will just not use shortcode with enclosed content, and split into begin
   and end shortcode instead.
 * EDIT: Sorry, didn’t realised it works in visual mode too.
    -  This reply was modified 6 years, 3 months ago by [innocenat](https://wordpress.org/support/users/innocenat/).
 *  Plugin Author [vaakash](https://wordpress.org/support/users/vaakash/)
 * (@vaakash)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/escape-code-does-not-works/#post-12310759)
 * [@innocenat](https://wordpress.org/support/users/innocenat/), Yeah anyways it
   is not something related to shortcodes from Shortcoder. It applies to any shortcode
   in WordPress.
 * Glad that you found a way.
    Cheers !
 *  Thread Starter [innocenat](https://wordpress.org/support/users/innocenat/)
 * (@innocenat)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/escape-code-does-not-works/#post-12310778)
 * Argh. You will always deny responsibility aren’t you? I am not looking for the
   fix, but you can’t deny that it is related because it works for all WordPress
   shortcode **EXCEPT** in the situation explained above. Having other ways to accomplish
   the same thing doesn’t mean that another way isn’t valid.
 * You are probably going to brush it aside again anyway.
 *  Plugin Author [vaakash](https://wordpress.org/support/users/vaakash/)
 * (@vaakash)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/escape-code-does-not-works/#post-12310804)
 * Can you please share me an example where the standard way of double escaping 
   does not work because of enclosed content ?
 * Because in the example screenshot you shared I didn’t find any enclosed shortcode
   i.e `[/sc]`
 * Did you try something like this ?
 * `[[sc name="parent" ]]Some content [[/sc]]`

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Escape code does not works’ is closed to new replies.

 * ![](https://ps.w.org/shortcoder/assets/icon.svg?rev=2222236)
 * [Shortcoder — Create Shortcodes for Anything](https://wordpress.org/plugins/shortcoder/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/shortcoder/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/shortcoder/)
 * [Active Topics](https://wordpress.org/support/plugin/shortcoder/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/shortcoder/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/shortcoder/reviews/)

 * 11 replies
 * 2 participants
 * Last reply from: [vaakash](https://wordpress.org/support/users/vaakash/)
 * Last activity: [6 years, 3 months ago](https://wordpress.org/support/topic/escape-code-does-not-works/#post-12310804)
 * Status: resolved