WP inserts paragraph close tag after self closed image tag
-
Hi,
I’m having some problems with WordPress’s automatic paragraph formatting. When I have a self closed image tag followed on the next line by any content (all enclosed in a div) WordPress inserts a paragraph close tag after the image on viewing.
So this:
<div> <img src="sample_image.jpg" width="240" height="240" alt="Sample" /> <h1>Sample Header</h1> </div>
Becomes this:
<div> <img src="sample_image.jpg" width="240" height="240" alt="Sample" /></p> <h1>Sample Header</h1> </div>
I thought it might be a problem with the ‘wpautop’ function, so I updated that with code from 2.2 but it made no difference. Could it be something to do with tag balancing?
Thanks
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘WP inserts paragraph close tag after self closed image tag’ is closed to new replies.