Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 14 months ago

#56457 closed enhancement (fixed)

WPCS: Self closing tags are not property closed.

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

Description

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 4 years ago.
Patch Added

Download all attachments as: .zip

Change History (11)

@haritpanchal
4 years ago

Patch Added

#1 @haritpanchal
4 years ago

  • Keywords has-patch added; needs-patch removed

#2 @costdev
4 years ago

  • Focuses docs removed
  • Milestone Awaiting Review6.1
  • Severity majorminor
  • Version 6.0.1

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.


4 years ago

#4 @audrasjb
4 years ago

  • Owner set to audrasjb
  • Status newreviewing

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
4 years ago

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

#7 @audrasjb
4 years ago

  • Resolutionfixed
  • Status reviewingclosed

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.
See https://developer.wordpress.org/coding-standards/wordpress-coding-standards/html/#self-closing-elements

Props haritpanchal, costdev, audrasjb.
Fixes #56457.

#9 @afragen
4 years ago

Related #56647

#10 @SirLouen
14 months ago

#45939 was marked as a duplicate.

Note: See TracTickets for help on using tickets.