_wp_sanitize_utf8_in_redirect
URL encode UTF-8 characters in a URL.
Description
(string) _wp_sanitize_utf8_in_redirect( (array) $matches );
Returns (string)
URL-encoded version of the first RegEx match.
Parameters (1)
- 0. $matches (array)
- RegEx matches against the redirect location.
Usage
if ( !function_exists( '_wp_sanitize_utf8_in_redirect' ) ) { require_once ABSPATH . WPINC . '/pluggable.php'; } // RegEx matches against the redirect location. $matches = array(); // NOTICE! Understand what this does before running. $result = _wp_sanitize_utf8_in_redirect($matches);
Defined (1)
The function is defined in the following location(s).
- /wp-includes/pluggable.php
- function _wp_sanitize_utf8_in_redirect( $matches ) {
- return urlencode( $matches[0] );
- }