Make WordPress Core

Opened 21 months ago

Closed 21 months ago

Last modified 20 months ago

#56457 closed enhancement (fixed)

WPCS: Self closing tags are not property closed.

Reported by: haritpanchal's profile haritpanchal Owned by: audrasjb's profile audrasjb
Milestone: 6.1 Priority: normal
Severity: minor Version:
Component: Administration Keywords: has-patch
Focuses: coding-standards Cc:


All tags must be properly closed. For tags that are self-closing, the forward slash should have exactly one space preceding it. I found several <br /> tags closed improperly as <br/>. According to coding standards, it should close in <br /> aw

Attachments (1)

56457.patch (8.0 KB) - added by haritpanchal 21 months ago.
Patch Added

Download all attachments as: .zip

Change History (10)

21 months ago

Patch Added

#1 @haritpanchal
21 months ago

  • Keywords has-patch added; needs-patch removed

#2 @costdev
21 months ago

  • Focuses docs removed
  • Milestone changed from Awaiting Review to 6.1
  • Severity changed from major to minor
  • Version 6.0.1 deleted

For tags that are self-closing, the forward slash should have exactly one space preceding it:
<br /> rather than the compact but incorrect: <br>

HTML Coding Standards - Self-closing Elements

  • Removing Version as the patch touches lines added across multiple versions of WordPress.

This ticket was mentioned in Slack in #core by audrasjb. View the logs.

21 months ago

#4 @audrasjb
21 months ago

  • Owner set to audrasjb
  • Status changed from new to reviewing

Reviewed during today's bug scrub.

It would be nice to run unit tests on this before commit, just in case some html content/strings are used by existing unit tests.

Self assigning for unit tests run and (most probably) commit

#6 @audrasjb
21 months ago

The above PR addresses a missed occurence in wp-includes/media-template.php.

#7 @audrasjb
21 months ago

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

In 54062:

Coding Standards: Use a consistent markup for line break tags across Core.

This changeset replaces <br/> with <br /> on various places, as per WordPress Coding Standards.

Props haritpanchal, costdev, audrasjb.
Fixes #56457.

Note: See TracTickets for help on using tickets.