Make WordPress Core

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#61318 closed defect (bug) (fixed)

wp_trigger_error() strips out allowed HTML tags

Reported by: thelovekesh Owned by: thelovekesh
Priority: normal Milestone: 6.6
Component: General Version: 6.6
Severity: normal Keywords: has-patch has-unit-tests
Cc: Focuses:

Description

The function wp_trigger_error() allows certain HTML tags in the error message. However, it isn't working correctly because wp_kses() expects the allowed HTML tags to be specified in an associative array format.

Change History (6)

This ticket was mentioned in ​PR #6671 on ​WordPress/wordpress-develop by ​@thelovekesh.


2 years ago
#1

  • Keywords has-patch has-unit-tests added

Update allowed HTML tags declaration in wp_trigger_error().

Trac ticket: https://core.trac.wordpress.org/ticket/61318

​@thelovekesh commented on ​PR #6671:


2 years ago
#2

Hey @hellofromtonya 👋🏼

Can you please review this PR? Thanks.

#3 @westonruter
2 years ago

  • Resolution → fixed
  • Status assigned → closed

In 58361:

General: Fix array format for allowed HTML passed into wp_kses() for wp_trigger_error().

Kses requires an associative array of allowed HTML.

See #57686. Follow-up to [56707].

Props thelovekesh, westonruter.
Fixes #61318.

​@westonruter commented on ​PR #6671:


2 years ago
#4

Committed in r58361 (da1ad31).

#5 @kebbet
2 years ago

@westonruter Could you please milestone this ticket in 6.6, thanks!

#6 @sabernhardt
2 years ago

  • Milestone Awaiting Review → 6.6
Note: See TracTickets for help on using tickets.