A WordPress-centric search engine for devs and theme authors



_wp_sanitize_utf8_in_redirect ›

Since4.2.0
Deprecatedn/a
_wp_sanitize_utf8_in_redirect ( $matches )
Access:
  • private
Parameters:
  • (array) $matches RegEx matches against the redirect location.
    Required: Yes
See:
Returns:
  • (string) URL-encoded version of the first RegEx match.
Defined at:
Codex:

URL encode UTF-8 characters in a URL.



Source

function _wp_sanitize_utf8_in_redirect( $matches ) {
		return urlencode( $matches[0] );
	}
endif;

if ( ! function_exists( 'wp_safe_redirect' ) ) :