[wp-trac] [WordPress Trac] #3935: wpautop breaking blank pages and
some plugins
WordPress Trac
wp-trac at lists.automattic.com
Thu Mar 8 07:43:23 GMT 2007
#3935: wpautop breaking blank pages and some plugins
----------------------+-----------------------------------------------------
Reporter: DD32 | Owner: anonymous
Type: defect | Status: new
Priority: normal | Milestone: 2.2
Component: Template | Version: 2.2
Severity: normal | Keywords: has-patch needs-testing
----------------------+-----------------------------------------------------
2 issues i'm proposing a patch for:[[BR]]
1. Blank pages contain a single '</p>' instead of a full paragraph:
'<p></p>'[[BR]]
2. Extra </p> tags are inserted before certain block elements where they
shouldnt be placed.[[BR]]
[[BR]]
'''Issue 1:'''[[BR]]
Create a completely blank post, View the source of the page, it'll be
similar to this:[[BR]]
{{{
<h1>Test Heading</h1>
</p>
}}}
The Paragraph is never opened, Of course if there is any non-space
characters in a page, this issue doesnt exist. But it also affects plugins
which use pages to dsplay their content.[[BR]]
[[BR]]
'''Issue 2:'''[[BR]]
When using plugins such as ''WP-ContactForm: Akismet Edition'' which hook
the_content, the output is converted to this:[[BR]]
{{{
<input type="hidden" name="wpcf_stage" value="process" /></div>
</p></form>
</p></div>
}}}
Both of those </p> elements shouldnt be there. [[BR]]
[[BR]]
'''Both of these issues make blank posts, or certain content plugins fail
XHTML Validation, making the page unviewable when using ''html_type'' set
to ''application/xhtml+xml'' '''[[BR]]
[[BR]]
Attached is a patch which fixes both of these rare cases.[[BR]]
There also doesnt seem to be any performance hit accroding to the
profiler.
--
Ticket URL: <http://trac.wordpress.org/ticket/3935>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list