Opened 15 years ago
Closed 15 years ago
#11024 closed defect (bug) (fixed)
Invalid xhtml output from both TinyMCE and wpautop
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 2.9 | Priority: | high |
Severity: | trivial | Version: | 2.8.4 |
Component: | Validation | Keywords: | reporter-feedback |
Focuses: | Cc: |
Description
if you have anchor just before the closing div tag, the paragraph of the previous line is not closed. You can try to type the code at the end of this ticket to html editor and switch to tinymce - it automaticaly strips out the blank line before the closing div, so the result is
<div> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. <a href="http://www.example.com">Ut enim ad minim veniam</a></div>
So the error is both in tinymce (it should not strips out the blank line) and in wpautop function (or other which formats text) which should find that there is not closed P tag before the closing div. The error appears even if you have checked "let wordpress repair the xhtml errors" option.
<div> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. <a href="http://www.example.com">Ut enim ad minim veniam</a> </div>
Change History (5)
Note: See
TracTickets for help on using
tickets.
Cannot reproduce this in trunk. Pasting the example code in the HTML editor produces valid output, even pasting
is corrected and still produces valid output.
The browser (and TinyMCE) don't really care about blank lines/hard returns in the contentEditble iframe as in HTML they are not significant except in a <pre> tag.