[wp-hackers] p inside blockquote

Benjamin Hawkes-Lewis bhawkeslewis at googlemail.com
Thu Mar 1 11:53:48 GMT 2007


On Thu, 2007-03-01 at 09:57 +0100, Alex Günsche wrote:
> On Wed, 2007-02-28 at 23:37 -0800, Scot Hacker wrote:
> > 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.
> 
> As for the divs, you are right. As for the paragraphs inside
> blockquotes, I'm afraid you're wrong, at least considering XHTML 1.1. 

A quick test shows that <blockquote>test</blockquote> validates in XHTML
1.0 Transitional, a doctype intended for legacy content in an old
version of XHTML. It does not validate in XHTML 1.0 Strict, the doctype
intended for newly authored content (i.e. such as a WordPress blog), or
XHTML 1.1 (the current version). That's because the Transitional DTD
defines <blockquote/>'s content model as %Flow; not %Block; .

There is of course an element intended for short quotations: <q/>.

However it is true that content inside a blockquote need not be a <p/>.
It might equally be a <div/>, a <table/>, another <blockquote/>, etc.,
and WordPress certainly shouldn't be trying to dump quoted block
elements inside <p/> (if that is what it is doing.)

--
Benjamin Hawkes-Lewis



More information about the wp-hackers mailing list