Make WordPress Core

Opened 18 years ago

Closed 16 years ago

Last modified 13 years ago

#3362 closed defect (bug) (duplicate)

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

Reported by: upekshapriya's profile 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)

#1 @upekshapriya
18 years ago

  • Component changed from Administration to General

#2 @Nazgul
17 years ago

  • Milestone set to 2.4 (future)

#3 @thee17
17 years ago

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

#4 @DD32
17 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.

#5 @westi
17 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

#6 @westi
17 years ago

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

#7 @Denis-de-Bernardy
16 years ago

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

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

#8 @mtekk
16 years ago

  • Milestone 2.9 deleted

#9 @SergeyBiryukov
13 years ago

  • Keywords needs-unit-tests removed

#10 @SergeyBiryukov
13 years ago

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