_wp_sanitize_utf8_in_redirect

The timeline below displays how wordpress function _wp_sanitize_utf8_in_redirect has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.1

/**
 * URL encodes UTF-8 characters in a URL.
 *
 * @ignore
 * @since 4.2.0
 * @access private
 *
 * @see wp_sanitize_redirect()
 *
 * @param array $matches RegEx matches against the redirect location.
 * @return string URL-encoded version of the first RegEx match.
 */
function _wp_sanitize_utf8_in_redirect($matches)
{
    return urlencode($matches[0]);
}

WordPress Version: 4.5

/**
 * URL encode UTF-8 characters in a URL.
 *
 * @ignore
 * @since 4.2.0
 * @access private
 *
 * @see wp_sanitize_redirect()
 *
 * @param array $matches RegEx matches against the redirect location.
 * @return string URL-encoded version of the first RegEx match.
 */
function _wp_sanitize_utf8_in_redirect($matches)
{
    return urlencode($matches[0]);
}

WordPress Version: 4.2

/**
 * URL encode UTF-8 characters in a URL.
 *
 * @ignore
 * @since 4.2.0
 * @access private
 *
 * @see wp_sanitize_redirect()
 */
function _wp_sanitize_utf8_in_redirect($matches)
{
    return urlencode($matches[0]);
}