Opened 18 years ago
Closed 17 years ago
#3935 closed defect (bug) (wontfix)
wpautop breaking blank pages and some plugins
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.2 |
Component: | Template | Keywords: | has-patch needs-testing |
Focuses: | Cc: |
Description
2 issues i'm proposing a patch for:
- Blank pages contain a single '</p>' instead of a full paragraph: '<p></p>'
- Extra </p> tags are inserted before certain block elements where they shouldnt be placed.
Issue 1:
Create a completely blank post, View the source of the page, it'll be similar to this:
<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.
Issue 2:
When using plugins such as WP-ContactForm: Akismet Edition which hook the_content, the output is converted to this:
<input type="hidden" name="wpcf_stage" value="process" /></div> </p></form> </p></div>
Both of those </p> elements shouldnt be there.
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
Attached is a patch which fixes both of these rare cases.
There also doesnt seem to be any performance hit accroding to the profiler.
wpautop patch