Title: Weird wpautop behavior
Last modified: March 16, 2021

---

# Weird wpautop behavior

 *  [heretik](https://wordpress.org/support/users/heretik/)
 * (@heretik)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/weird-wpautop-behavior/)
 * Hi,
    recently i’ve noticed that wpautop function added </p> tag (only the ending
   part of p) all over the place on my page, particulary in shortcodes.
 * After bit of experimenting, i am now able to reproduce this behavior on two completely
   different installations of wordpress (one of which is clean install without any
   plugins activated) simply by executing wpautop on this html snippet:
 *     ```
       <div>
       <div>
           </div>
           </div>
       ```
   
 * it produces somewhat unexpected output:
 *     ```
       <div>
       <div>
           </div>
       </p></div>
       ```
   
 * I presume this is bug in wpautop function, or am i doing something wrong?
 * Thanks for help.

The topic ‘Weird wpautop behavior’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [heretik](https://wordpress.org/support/users/heretik/)
 * Last activity: [5 years, 1 month ago](https://wordpress.org/support/topic/weird-wpautop-behavior/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
