Make WordPress Core

Opened 11 years ago

Last modified 2 years ago

#3833 reopened defect (bug)

Extra </p> inside blockquote — at Version 4

Reported by: audwan Owned by: anonymous
Milestone: Future Release Priority: normal
Severity: normal Version: 2.7
Component: Formatting Keywords: wpautop needs-patch
Focuses: Cc:

Description (last modified by foolswisdom)

When using blockquote </p> is inserted directly in front of </blockquote>, making the code invalid XHTML.


<blockquote>This is a blockquote</blockquote>

Gives the following result:

<blockquote>This is a blockquote</p></blockquote>

Seems like this forum thread adresses the same issue in the support forum.

Change History (4)

#1 @foolswisdom
11 years ago

  • Milestone changed from 2.1.3 to 2.2

#2 @rob1n
11 years ago

  • Milestone 2.2 deleted
  • Resolution set to worksforme
  • Status changed from new to closed

Using <blockquote> inside <li> is invalid. Use <q> instead.

For me, <blockquote>Hello, world. Wonder what this will do.</blockquote> puts <p>...</p> inside the <blockquote> fine.

This is with r5142. Closing as worksforme.

#3 @Goingthewongway
11 years ago

  • Resolution worksforme deleted
  • Status changed from closed to reopened
  • Version changed from 2.1 to 2.3.1

On version 2.3.1 this is still an issue.

For example, a post with only <blockquote>some quote</blockquote> will result in <blockquote>some quote</p></blockquote>, which is invalid XHTML.

This seems to me to be a result of:

  1. formatting.php:78 $pee = str_replace('</blockquote></p>', '</p></blockquote>', $pee);
  2. not having/not adding an opening "<p>" tag at the beginning of the post (even though it does get added for other all-text entries)

#4 @foolswisdom
11 years ago

  • Description modified (diff)
  • Keywords wpautop autop added
  • Priority changed from low to normal

ENV: WP trunk r6301

Confirmed bug exists as described.

The bug won't reproduce if there are no blank lines before the blockquotes, or if there is a paragraph before the blockquote. That likely explains it working for rob1n .

Repro having a block quote by the only text, inserted using visual editor.

Removed that part about blockquote in a list from description.

Note: See TracTickets for help on using tickets.