• https://yeago.net/works/problem-issue-with-wordpress-messing-up-html-with-p-and-br-tags

    That is a quick fix for technical users who want to force WP’s wpautop function to respect their tags.

    All I did was slightly re-write the wpautop function to be a little more maintenance and modification friendly.

    I am wondering, however, is there some reason why wpautop doesn’t ignore *everything* placed within < and > (instead of just the list within the function)? There may very well be good reasons, I’m really not that familiar with the ins and outs of WP. I do think the list of respected tags in the version I am using is a bit arbitrary.

    I also noticed that the 3rd to last preg_replace in wpautop did not contain all of the tags which the above ones did. I assumed this was a mistake (perhaps wrongly).

    ….or has this all been fixed in current versions? =)

  • The topic ‘End-all wpautop solution to P and BR tags messing up HTML in posts?’ is closed to new replies.