[wp-trac] [WordPress Trac] #57712: Suggestion for code comment in sanitize_user()
WordPress Trac
noreply at wordpress.org
Tue Feb 14 12:40:54 UTC 2023
#57712: Suggestion for code comment in sanitize_user()
-------------------------+-----------------------------
Reporter: ace100 | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Users | Version:
Severity: minor | Keywords:
Focuses: |
-------------------------+-----------------------------
I spent a long time trying to understand the following comment and code at
https://developer.wordpress.org/reference/functions/sanitize_user/:
{{{
// Kill octets.
$username = preg_replace( '|%([a-fA-F0-9][a-fA-F0-9])|', '', $username );
}}}
I think it would be better if the comment was "remove percent-encoded
characters".
--
Ticket URL: <https://core.trac.wordpress.org/ticket/57712>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list