WordPress.org

Make WordPress Core

Opened 10 years ago

Closed 9 years 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 (3)

comment:2 Bard0910 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

comment:3 matt9 years ago

  • Status changed from new to closed

Just checked in a fix to autop for this.

Note: See TracTickets for help on using tickets.