jim5471
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: WordPress 4.7 is inserting tags into my HTMLI did some more research and found some recent bug tickets for a couple of other examples of this problem which hopefully will inform others searching for this bug.
https://core.trac.www.ads-software.com/ticket/39307 << </p> tag inserted in <figure>
https://core.trac.www.ads-software.com/ticket/37672 << wpautop adds a closing p-tag without an opening p-tag
https://core.trac.www.ads-software.com/ticket/38656 << wpautop incorrectly handling paragraphs within block elements
https://core.trac.www.ads-software.com/ticket/39377 << wpautop adds a extra </p>Unfortunately the developers only seem to be preparing patches to fix <figure> & <span> tags and are unaware that there is a wider problem.
Maybe WordPress Support will tell them.Forum: Fixing WordPress
In reply to: WordPress 4.7 is inserting tags into my HTMLHi danteand
Thanks for taking the trouble to check my post and confirm you also are seeing the problem.I spent a bit of time last night and also saw it on a couple of “Best of WordPress” websites but there aren’t many examples.
Guess my new job is safe for the moment – at least I can explain to my boss why there are coding errors on my pages.The wpautop info is useful to know but I cannot go there as I only have an Editor account.
The website code that results from my OP is here. I have added blank lines to split the code blocks up to make it easier to read.
<p><span><br /> <img src="image.png" alt="thumb"></p> <p>Text</p> <p></span></p> <div> <img src="image.png" alt="thumb"></p> <p>The br tag vanishes</p> </div> <div><img src="image.png" alt="thumb"></p> <div>Caption</div> </div> <li> <img src="image.png" alt="thumb"></p> <p>Text</p> </li> <li> <img src="image.png" alt="thumb"><b>Almost the same as the previous code block but with no error</b> </li> <div><img src="image.png" alt="thumb">No error here either</div> <div><a href="document.htm"><img src="image.png" alt="thumb"></a></p> <p>Text</p> </div> <p><a href="document.htm"><img src="image.png" alt="thumb"></p> <p>Text</p> <p></a></p>
Forum: Fixing WordPress
In reply to: WordPress 4.7 is inserting tags into my HTMLI am aware of WordPress automatically inserting <p> and </p> tags.
But this is different – If you try the code you should only see the p closing tag ie: </p>
there is no p opening tag.“Disabling the wpautop filter” looks interesting. Do I just paste it in with the HTML ?