WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 5 years ago

Last modified 3 years ago

#3362 closed defect (bug) (duplicate)

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

Reported by: upekshapriya Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.0.5
Component: General Keywords: needs-patch needs-unit-tests
Focuses: 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 (10)

comment:1 upekshapriya7 years ago

  • Component changed from Administration to General

comment:2 Nazgul7 years ago

  • Milestone set to 2.4 (future)

comment:3 thee176 years ago

  • Resolution set to worksforme
  • Status changed from new to closed

comment:4 DD326 years ago

  • Resolution worksforme deleted
  • Status changed from closed to reopened

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.

comment:5 westi6 years ago

  • Keywords early autop needs-patch needs-unit-test added
  • 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

comment:6 westi6 years ago

  • Keywords needs-unit-tests added; needs-unit-test removed

comment:7 Denis-de-Bernardy5 years ago

  • Resolution set to duplicate
  • Status changed from reopened to closed

dup of #3007 (it's the same bug)

comment:8 mtekk5 years ago

  • Milestone 2.9 deleted

comment:9 SergeyBiryukov3 years ago

  • Keywords needs-unit-tests removed

comment:10 SergeyBiryukov3 years ago

  • Keywords needs-unit-tests added; blockquote xhtml validation paragraph early autop removed
Note: See TracTickets for help on using tickets.