[wp-trac] [WordPress Trac] #57686: Introduce wp_trigger_error() to compliment _doing_it_wrong()
WordPress Trac
noreply at wordpress.org
Fri Sep 8 00:31:01 UTC 2023
#57686: Introduce wp_trigger_error() to compliment _doing_it_wrong()
-------------------------------------------------+-------------------------
Reporter: azaozz | Owner:
| hellofromTonya
Type: enhancement | Status: assigned
Priority: normal | Milestone: 6.4
Component: General | Version:
Severity: normal | Resolution:
Keywords: needs-dev-note has-patch has-unit- | Focuses:
tests commit |
-------------------------------------------------+-------------------------
Comment (by azaozz):
Replying to [comment:30 hellofromTonya]:
> Hmm, `esc_html()` for the message being passed to `trigger_error()` is
not the right approach.
Maybe can just document it that the string is expected to be HTML escaped
(or "safe")?
> None of these functions have historically escaped their messages, and
given this was never raised as a problem
Sure, but the PHP manual warns otherwise :)
Thinking that documenting that the function requires an escaped/HTML safe
string would be enough?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/57686#comment:35>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list