Make WordPress Core

Opened 21 months ago

Last modified 20 months ago

#56562 assigned defect (bug)

<br> Tag should be self closing on wp-mail.php file

Reported by: rajanpanchal2028's profile rajanpanchal2028 Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Mail Keywords: has-patch close
Focuses: coding-standards Cc:


Previously <br> tag is not self-closing so I have make <br> tag self-closing.

Attachments (1)

56562.patch (503 bytes) - added by rajanpanchal2028 21 months ago.
Patch added.

Download all attachments as: .zip

Change History (7)

21 months ago

Patch added.

#1 @robinwpdeveloper
21 months ago

  • Keywords has-patch added; needs-patch removed

#2 @desrosj
21 months ago

  • Severity changed from major to normal

#3 @SergeyBiryukov
21 months ago

  • Keywords close added

Hi there, welcome back to WordPress Trac! Thanks for the patch.

I think the current code is correct, see the note for the strip_tags() function in the PHP Manual:

Self-closing XHTML tags are ignored and only non-self-closing tags should be used in allowed_tags. For example, to allow both <br> and <br/>, you should use:

strip_tags($input, '<br>');

#4 @costdev
21 months ago

@SergeyBiryukov is correct:

I agree with close.

#5 @rajanpanchal2028
21 months ago


If <br /> is not valid way to close <br> tag you can use <br/> tag as accordingly to WordPress coding standards <br/> is valid way to self-closing tag with strip_tags() function.

#6 @SergeyBiryukov
20 months ago

#56647 was marked as a duplicate.

Note: See TracTickets for help on using tickets.