Opened 20 years ago
Closed 18 years ago
#2239 closed defect (bug) (fixed)
Nested pre/blockquote in li produces invalid XHTML
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 2.6.1 | Priority: | normal |
| Severity: | normal | Version: | 2.0 |
| Component: | General | Keywords: | has-patch formatting wpautop xhtml |
| Focuses: | Cc: |
Description
Entering the following code in the plain editor produces invalid XHTML in WP 2.0 (worked fine with 1.5):
<ul>
<li>before<pre>pre1
pre2</pre>
after</li>
</ul>
The result has an unclosed p:
<li>before
<pre>pre1
pre2</pre>
<p>after</li>
</ul>
If one inserts an empty line before the closing li after "after", the p gets closed.
Attachments (1)
Change History (10)
#5
@
18 years ago
- Keywords has-patch wpautop added; needs-patch removed
This is caused by the ordering of replacements in wpautop(). "\n\n" is purposely inserted by one rule and later replaced with a <p> by another. The patch reorders the rules to avoid this.
Note: See
TracTickets for help on using
tickets.
This is still happening in SVN version [4984], exactly as described. Seems like it should be fixed...