Make WordPress Core

Opened 17 years ago

Closed 17 years ago

#3952 closed defect (bug) (fixed)

wpautop incorrectly wraps horizontal rules

Reported by: otto42's profile Otto42 Owned by: rob1n's profile rob1n
Milestone: 2.2 Priority: normal
Severity: normal Version: 2.1.2
Component: General Keywords:
Focuses: Cc:


hr tags get wrapped inside p.../p tags. Since hr is a block level element, and p can only contain inline elements, this causes a validation error. It's not enough to throw most browsers into quirks mode, but still, wpautop should be modified to recognize hr as a block level element.

I believe that adding hr to the $allblocks list in wpautop would be enough to solve the issue, but I'm not certain.

The issue has also been noted here:

Change History (4)

#1 @foolswisdom
17 years ago

  • Milestone changed from 2.2 to 2.3

#2 @foolswisdom
17 years ago

  • Milestone changed from 2.3 to 2.4

#3 @rob1n
17 years ago

  • Milestone changed from 2.4 to 2.2
  • Owner changed from anonymous to rob1n

#4 @rob1n
17 years ago

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

(In [5222]) Don't autop <hr />. fixes #3952

Note: See TracTickets for help on using tickets.