WordPress.org

Make WordPress Core

Opened 15 years ago

Closed 14 years ago

Last modified 9 months ago

#103 closed defect (bug)

<hr /> and <br /> tags entered in posts invalidate XHTML 1.0 Transitional

Reported by: Bard09 Owned by:
Milestone: Priority: normal
Severity: minor Version: 1.2
Component: Administration Keywords:
Focuses: Cc:

Description

It's pretty simple to reproduce:

Put <hr /> or <br /> on a new line in a post. Wordpress automatically encloses the tags with <p></p> tags, creating this, <p><hr /></p>, which is unfortunately invalid XHTML 1.0 Transitional.

Using your own <p></p> tags lets you put <br /> tags inside, but <hr /> tags must be placed outside to validate as XHTML.

This is a minor bug (if considered a bug at all) but it is rather frustrating. A PHP script that detects if <hr /> or <br /> is on a new line and skips wrapping it with <p></p> tags would work.

Change History (4)

#2 @Bard09
15 years ago

I can't seem to edit my own bug report. [HR] and [BR] tags are the tags I am indicating, as WP wraps them with [P] automatically.

edited on: 06-21-04 05:16

#3 @matt
14 years ago

  • Status changed from new to closed

Just checked in a fix to autop for this.

This ticket was mentioned in Slack in #forums by peterbooker. View the logs.


9 months ago

Note: See TracTickets for help on using tickets.