Title: Shortcode bug with enclosing html
Last modified: August 20, 2016

---

# Shortcode bug with enclosing html

 *  [yahrou](https://wordpress.org/support/users/yahrou/)
 * (@yahrou)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/shortcode-bug-with-enclosing-html/)
 * Hi all,
 * I’m working on a website using lots of short codes. The shortcodes use enclosng
   content and become very buggy when used with WYSIWYG wordpress editor and especially
   with html content.
 *     ```
       [the_box width="100%" type="landing"]
       <h2>Test content</h2>
       TEst test
   
       [/the_box]
       Test
       ```
   
 * The above code for example is giving me no content at all. And sometimes, but
   I find it difficult to reproduce, the outside content “Test” is being put within
   the box.
 * Is this a known issue ? Is there some workaround ? This is making me crazy !
 * Thank’s

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

 *  [Stefan](https://wordpress.org/support/users/svogel/)
 * (@svogel)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/shortcode-bug-with-enclosing-html/#post-2418019)
 * Hi yahrou,
 * have you found a solution? I’m currently having some issues with that, too.
    
   Especially switching between WYSIWYG and HTML-Mode in the Editor destroys the
   content-part of the shortcode.
 *  Thread Starter [yahrou](https://wordpress.org/support/users/yahrou/)
 * (@yahrou)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/shortcode-bug-with-enclosing-html/#post-2418020)
 * Hi,
 * I had to edit the shortcode itself (I mean, create a new shortcode on my own)
   and use div to enclose the content instead of span. It solved the problem…
 *  [Stefan](https://wordpress.org/support/users/svogel/)
 * (@svogel)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/shortcode-bug-with-enclosing-html/#post-2418021)
 * Thanks for your quick answer.

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

The topic ‘Shortcode bug with enclosing html’ is closed to new replies.

## Tags

 * [shortcode](https://wordpress.org/support/topic-tag/shortcode/)

 * 3 replies
 * 2 participants
 * Last reply from: [Stefan](https://wordpress.org/support/users/svogel/)
 * Last activity: [14 years, 4 months ago](https://wordpress.org/support/topic/shortcode-bug-with-enclosing-html/#post-2418021)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
