[wp-hackers] p inside blockquote
Scot Hacker
shacker at birdhouse.org
Thu Mar 1 07:37:36 GMT 2007
On Feb 28, 2007, at 11:24 PM, Scot Hacker wrote:
>> From: "Sam Angove" <sam at rephrase.net>
>>
>>> There is no XHTML rule that says this should happen. Create a test
>>> document with a blockquote, without the inner p, and validate it.
>>> It's fine. Both p and blockquote are block-level HTML elements. Why
>>> nest one inside the other?
>>
>> The p element cannot contain block-level elements.
>
> I'm not suggesting that it should. I'm saying that blockquote can
> stand on its own without any p container, either inside or outside
> of itself. But WP won't let that happen (and this seems to be new
> behavior for WP - my blockquote CSS only broke with a recent
> update). WP is inserting unnecessary HTML that breaks a good number
> of CSS designs, and I'd like for it to stop doing that.
Looks like it's doing this to <div> as well. Enter:
<div>content</div>
and it renders:
<div><p>content</p></div>
Why? div, blockquote, and p are block-level equals. No XHTML rule
says that content inside a div or a blockquote must be in a p
container. But WP apparently thinks it must be so.
Why should this:
<div><img src="foo"></div>
be forced to become this:
<div><p><img src="foo"/></div>
???
Tested in 2.1 and 2.1.1
Scot
More information about the wp-hackers
mailing list