Title: Shortcode Block Can&#8217;t Do Shortcodes
Last modified: February 19, 2019

---

# Shortcode Block Can’t Do Shortcodes

 *  [diywebmastery](https://wordpress.org/support/users/diywebmastery/)
 * (@diywebmastery)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/shortcode-block-cant-do-shortcodes/)
 * Gutenberg includes a shortcode block, but it seems unable to cope with all but
   the simplest of shortcodes. I am using one that looks a lot like this.
 * `[myshortcode src="https:/my-image.jpg" caption="<a href='https://link-elsewhere'
   >Linked Text</a>"]`
 * But on saving, the shortcode block complains with “This block contains unexpected
   or invalid content”. When I hit the _resolve_ button it highlights the single
   quotes in the shortcode in red and adds further double quotes around them.
 * If I allow the resolve to go ahead, it replaces the shortcode block with paragraph
   block which displays the image and no caption. In other words it doesn’t interpret
   the shortcode properly.
 * If I change the block to a custom HTML block, it changes the single quotes to
   double quotes on save. This causes the caption to not appear due to the syntax
   being invalid.
 * If I escape the single quotes or use the ascii HTML entity value & # 39 ; then
   all manner of weirdness happens and I get variously the HTML itself displayed
   as a caption complete with & # 39 ; displayed, or no caption at all if I attempt
   to escape with a backslash.
 * This has been an issue for ages. Please, please, please fix it.
    -  This topic was modified 7 years, 3 months ago by [diywebmastery](https://wordpress.org/support/users/diywebmastery/).
    -  This topic was modified 7 years, 3 months ago by [diywebmastery](https://wordpress.org/support/users/diywebmastery/).
    -  This topic was modified 7 years, 3 months ago by [diywebmastery](https://wordpress.org/support/users/diywebmastery/).
    -  This topic was modified 7 years, 3 months ago by [diywebmastery](https://wordpress.org/support/users/diywebmastery/).

The topic ‘Shortcode Block Can’t Do Shortcodes’ is closed to new replies.

 * ![](https://ps.w.org/gutenberg/assets/icon-256x256.jpg?rev=1776042)
 * [Gutenberg](https://wordpress.org/plugins/gutenberg/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/gutenberg/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/gutenberg/)
 * [Active Topics](https://wordpress.org/support/plugin/gutenberg/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/gutenberg/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/gutenberg/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [diywebmastery](https://wordpress.org/support/users/diywebmastery/)
 * Last activity: [7 years, 3 months ago](https://wordpress.org/support/topic/shortcode-block-cant-do-shortcodes/)
 * Status: not resolved