Ticket #3362 (reopened defect (bug))

Opened 2 years ago

Last modified 10 months ago

Missing <p> tag from <blockquote> (as well as extra <br /> sometimes) invalidates xhtml

Reported by: upekshapriya Assigned to: anonymous
Priority: normal Milestone: 2.9
Component: General Version: 2.0.5
Severity: normal Keywords: blockquote xhtml validation paragraph early autop needs-patch needs-unit-tests
Cc:

Description

Wordpress 2.0.5 always seems to miss off the opening <p> tag inside a <blockquote> (and if it is embedded in text adds a <br /> tag before the <blockquote>) which invalidates XHTML

The following text (with a break before the blockquote):

Text before blockquote that goes on and on and on and on and on and on and on and on and on and on and on and on and on and on and on: <br /> <blockquote> &quot;Text withing blockquote that also goes on and on and on and on and on and on and on and on and on.&quot; </blockquote> Text after block quote that doesn't go on and on.<br />

becomes:

<p> Text before blockquote that goes on and on and on and on and on and on and on and on and on and on and on and on and on and on and on: <br /> <br /> <blockquote> &quot;Text withing blockquote that also goes on and on and on and on and on and on and on and on and on.&quot; </p></blockquote> <p> Text after block quote that doesn&#8217;t go on and on. </p>

With a blockquote at the beginning (and no break character before):

<blockquote> &quot;Text withing blockquote that also goes on and on and on and on and on and on and on and on and on.&quot; </blockquote> Text after block quote that doesn't go on and on. <br /> <br /> Just separated by some break characters

becomes:

<blockquote> &quot;Text withing blockquote that also goes on and on and on and on and on and on and on and on and on.&quot; </p></blockquote> <p> Text after block quote that doesn&#8217;t go on and on. </p> <p> Just separated by some break characters </p>

Text before blockquote (with a break before the quote):

Text before blockquote that goes on and on and on and on and on and on and on and on and on and on and on and on and on and on and on: <br /> <blockquote> &quot;Text withing blockquote that also goes on and on and on and on and on and on and on and on and on.&quot; </blockquote>

becomes:

<p> Text before blockquote that goes on and on and on and on and on and on and on and on and on and on and on and on and on and on and on: <br /> <br /> <blockquote> &quot;Text withing blockquote that also goes on and on and on and on and on and on and on and on and on.&quot; </p></blockquote>

Blockquote at the end (without a break before the quote):

Text before blockquote that goes on and on and on and on and on and on and on and on and on and on and on and on and on and on and on: <blockquote> &quot;Text withing blockquote that also goes on and on and on and on and on and on and on and on and on.&quot; </blockquote>

becomes:

<p> Text before blockquote that goes on and on and on and on and on and on and on and on and on and on and on and on and on and on and on:<br /> <blockquote> &quot;Text withing blockquote that also goes on and on and on and on and on and on and on and on and on.&quot; </p></blockquote>

Blockquote on its own:

<blockquote> &quot;Text withing blockquote that also goes on and on and on and on and on and on and on and on and on.&quot; </blockquote>

becomes

<blockquote> &quot;Text withing blockquote that also goes on and on and on and on and on and on and on and on and on.&quot; </p></blockquote>

Change History

11/16/06 22:48:59 changed by upekshapriya

  • component changed from Administration to General.

07/15/07 18:19:20 changed by Nazgul

  • milestone set to 2.4 (future).

01/15/08 04:28:09 changed by thee17

  • status changed from new to closed.
  • resolution set to worksforme.

01/15/08 04:42:04 changed by DD32

  • status changed from closed to reopened.
  • resolution deleted.

Problem Still exists in trunk.

Input:

Text before blockquote that goes on and on and on and on and on and on and on and on and on and on and on and on and on and on and on: <br />
<blockquote> "Text withing blockquote that also goes on and on and on and on and on and on and on and on and on." </blockquote> Text after block quote that doesn't go on and on.<br />

Output:

<p>Text before blockquote that goes on and on and on and on and on and on and on and on and on and on and on and on and on and on and on: </p>
<blockquote><p> &quot;Text withing blockquote that also goes on and on and on and on and on and on and on and on and on.&quot; </p></blockquote>
<p> Text after block quote that doesn&#8217;t go on and on.</p>

(Works OK).

Next:

Input:

Text before blockquote that goes on and on and on and on and on and on and on and on and on and on and on and on and on and on and on: <br /><blockquote> "Text withing blockquote that also goes on and on and on and on and on and on and on and on and on." </blockquote> Text after block quote that doesn't go on and on.<br />

Output:

<p>Text before blockquote that goes on and on and on and on and on and on and on and on and on and on and on and on and on and on and on: <br />
<blockquote> &quot;Text withing blockquote that also goes on and on and on and on and on and on and on and on and on.&quot; </p></blockquote>
<p> Text after block quote that doesn&#8217;t go on and on.</p>

Both are identical inputs, Except the 1st includes a \n between <br> and <blockquote>

However, Blockquote on its own: example given seems to work OK now.

03/15/08 19:06:43 changed by westi

  • keywords changed from blockquote xhtml validation paragraph to blockquote xhtml validation paragraph early autop needs-patch needs-unit-test.
  • milestone changed from 2.5 to 2.6.

My guess is this is autop at work.

We have a number of autop and other formatting related tickets around.

I am loath to change something like this late in the release cycle and without a large corpus of test cases to validate changes don't break other behaviour.

Moving to 2.6

03/15/08 19:10:55 changed by westi

  • keywords changed from blockquote xhtml validation paragraph early autop needs-patch needs-unit-test to blockquote xhtml validation paragraph early autop needs-patch needs-unit-tests.