WordPress.org

Make WordPress Core

Opened 5 days ago

Closed 5 days ago

#48848 closed defect (bug) (maybelater)

Passing array of tag names for strip_tags() in WP Mail

Reported by: dkarfa Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Mail Keywords: has-patch
Focuses: Cc:
PR Number:

Description


Attachments (1)

48848.patch (521 bytes) - added by dkarfa 5 days ago.

Download all attachments as: .zip

Change History (4)

@dkarfa
5 days ago

#1 @dkarfa
5 days ago

In PHP 7.4 now strip_tags() also accepts an array of allowed tags: instead of strip_tags($str, '<a><p>') you can now write strip_tags($str, ['a', 'p']).

#2 @skithund
5 days ago

WordPress supports PHP 5.6+, so there's no need for PHP 7.4 only code refactoring.

#3 @SergeyBiryukov
5 days ago

  • Milestone Awaiting Review deleted
  • Resolution set to maybelater
  • Status changed from new to closed

Thanks for the patch!

As noted in comment:2, WordPress still supports PHP 5.6+, so the patch cannot be used until the minimum required version is bumped to PHP 7.4.

Note: See TracTickets for help on using tickets.