[wp-trac] [WordPress Trac] #62619: Remove `wp_kses_post()` filtering from admin notices
WordPress Trac
noreply at wordpress.org
Fri Dec 20 18:40:41 UTC 2024
#62619: Remove `wp_kses_post()` filtering from admin notices
----------------------------+---------------------
Reporter: azaozz | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.8
Component: Administration | Version: 6.4
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
----------------------------+---------------------
Comment (by sabernhardt):
I do not think this would require creating a new function. Whenever the
KSES is inappropriate, and the `$message` contents are properly sanitized,
developers probably could use `echo wp_get_admin_notice( $message )`
instead. (I proposed that change for #62606.)
Other notes:
- At first, I thought about adding an argument for whether
`wp_admin_notice()` sanitizes the content, with 'wp_kses_post' as the
default. It could be even more elaborate with something like a
[https://core.trac.wordpress.org/browser/trunk/src/wp-
includes/meta.php?rev=59023&marks=1391#L1391 $sanitize_callback argument],
but even a simpler form of the argument seems unnecessary.
- A [https://wpdirectory.net/search/01JFJD864Q8524Q4PVSW101GE0 directory
search of the `wp_admin_notice` action] yielded zero results.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62619#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list