Changeset 3481 for trunk/wp-includes/functions-formatting.php
- Timestamp:
- 01/25/2006 03:09:16 AM (20 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/functions-formatting.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/functions-formatting.php
r3454 r3481 266 266 } 267 267 268 function sanitize_user( $username ) {268 function sanitize_user( $username, $strict = false ) { 269 269 $raw_username = $username; 270 270 $username = strip_tags($username); … … 272 272 $username = preg_replace('|%([a-fA-F0-9][a-fA-F0-9])|', '', $username); 273 273 $username = preg_replace('/&.+?;/', '', $username); // Kill entities 274 return apply_filters('sanitize_user', $username, $raw_username); 274 275 // If strict, reduce to ASCII for max portability. 276 if ( $strict ) 277 $username = preg_replace('|[^a-z0-9 _.-@]|i', '', $username); 278 279 return apply_filters('sanitize_user', $username, $raw_username, $strict); 275 280 } 276 281
Note: See TracChangeset
for help on using the changeset viewer.