Title: Unexpected  closed tag p and tag br solved (but not sure:-)
Last modified: August 24, 2016

---

# Unexpected closed tag p and tag br solved (but not sure:-)

 *  [sovabarmak](https://wordpress.org/support/users/sovabarmak/)
 * (@sovabarmak)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/unexpected-and-solved/)
 * At first, very big thank you for plugin.
 * I had same problems as in topics
    [https://wordpress.org/support/topic/stop-removing-the-option-adds-empty-line?replies=5](https://wordpress.org/support/topic/stop-removing-the-option-adds-empty-line?replies=5)
   [https://wordpress.org/support/topic/tinymce-advanced-is-creating-lots-of-with-no-opening-tag?replies=1](https://wordpress.org/support/topic/tinymce-advanced-is-creating-lots-of-with-no-opening-tag?replies=1)
 * All was doing in text mode
 * When I tried to save such code
 *     ```
       <div><img src="path" alt="" />
       <h4>Some text</h4>
       </div>
       ```
   
 * I got
 *     ```
       <div><img src="path" alt="" /></p>
       <h4>Some text</h4>
       </div>
       ```
   
 * When I tried to save such code
    `<div><img src="path" alt="" /><h4>Some text</
   h4></div>`
 * I got
 *     ```
       <div><img src="path" alt="" /><br/>
       <h4>Some text</h4></p>
       </div>
       ```
   
 * Several hours I tried to find code wich do this problem in your plugin and in
   core of wordpress in js files.
    But this problem solved when in file tinymce-
   advanced.php on line 476 I commented string `//$c = wpautop( $c )`
 * [https://wordpress.org/plugins/tinymce-advanced/](https://wordpress.org/plugins/tinymce-advanced/)

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

 *  [brk983](https://wordpress.org/support/users/brk983/)
 * (@brk983)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/unexpected-and-solved/#post-6181458)
 * Thanks for the fix.
 *  Plugin Author [Andrew Ozz](https://wordpress.org/support/users/azaozz/)
 * (@azaozz)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/unexpected-and-solved/#post-6181507)
 * Yeah, this is a limitation in wpautop. The
 * `//$c = wpautop( $c );`
 * “hack” will work only for posts that were saved without wpautop. If you have 
   earlier posts that were saved with wpautop (i.e. the `<p>` tags were replaced
   with line breaks), loading one of them for editing will make it load without 
   paragraphs.

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

The topic ‘Unexpected closed tag p and tag br solved (but not sure:-)’ is closed
to new replies.

 * ![](https://ps.w.org/tinymce-advanced/assets/icon-256x256.png?rev=971511)
 * [Advanced Editor Tools](https://wordpress.org/plugins/tinymce-advanced/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/tinymce-advanced/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/tinymce-advanced/)
 * [Active Topics](https://wordpress.org/support/plugin/tinymce-advanced/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/tinymce-advanced/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/tinymce-advanced/reviews/)

 * 2 replies
 * 3 participants
 * Last reply from: [Andrew Ozz](https://wordpress.org/support/users/azaozz/)
 * Last activity: [10 years, 11 months ago](https://wordpress.org/support/topic/unexpected-and-solved/#post-6181507)
 * Status: not resolved