Make WordPress Core

Opened 20 years ago

Closed 17 years ago

Last modified 15 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:
Priority: normal Milestone:
Component: General Version: 2.0.5
Severity: normal Keywords: needs-patch needs-unit-tests
Cc: Focuses:

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
20 years ago

  • Component Administration → General

#2 @Nazgul
19 years ago

  • Milestone → 2.4 (future)

#3 @thee17
19 years ago

  • Resolution → worksforme
  • Status new → closed

#4 @DD32
19 years ago

  • Resolution worksforme
  • Status closed → 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
19 years ago

  • Keywords early autop needs-patch needs-unit-test added
  • Milestone 2.5 → 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
19 years ago

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

#7 @Denis-de-Bernardy
17 years ago

  • Resolution → duplicate
  • Status reopened → closed

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

#8 @mtekk
17 years ago

  • Milestone 2.9

#9 @SergeyBiryukov
15 years ago

  • Keywords needs-unit-tests removed

#10 @SergeyBiryukov
15 years ago

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