#3476 closed defect (bug) (duplicate)
<object> elements should not be put on their own line by wpautop
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | high | |
Severity: | major | Version: | 2.1 |
Component: | General | Keywords: | needs-patch |
Focuses: | Cc: |
Description
I don't know where to begin, but it needs a major overhaul.
For example, make a post with this:
Test<object>Blah</object>
That's perfectly valid XHTML.
It results in this:
<p>Test<br /> <object>Blah</object>
No closing </p>
and a <br />
that shouldn't be there.
It also really likes putting <br />
's inside <object>
tags even when there was no line break there.
The list goes on an on and it affects more than just <object>
tags. As I said, I dunno where to start...
Change History (4)
#2
@
19 years ago
- Summary changed from wpautop is a mess to <object> elements should not be put on their own line by wpautop
#3
@
19 years ago
The issue with new lines is a bug, as far as I can see, rather than any behavioral choices.
Looking at Revision 4672:
http://trac.wordpress.org/browser/branches/2.0/wp-includes/functions-formatting.php?rev=4672
Line 68 adds a linebreak before block-level tags, for code appearance (as far as I can tell). However, line 80 converts linebreaks left over after auto-paragraphing to <br />s - so all that lovely code formatting is converted to visible formatting.
My solution has been to move lines 68 and 69 to the bottom of the function, because as far as I know these are only for code formatting.
Anybody in the know care to comment?
I presume it's there because people post YouTube videos on the same line as the text, making the last line of the text go down to the bottom of the video.
But yeah, that's a bit funky.