wp_kses_stripslashes

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

WordPress Version: 6.2

/**
 * Strips slashes from in front of quotes.
 *
 * This function changes the character sequence `\"` to just `"`. It leaves all other
 * slashes alone. The quoting from `preg_replace(//e)` requires this.
 *
 * @since 1.0.0
 *
 * @param string $content String to strip slashes from.
 * @return string Fixed string with quoted slashes.
 */
function wp_kses_stripslashes($content)
{
    return preg_replace('%\\\\"%', '"', $content);
}

WordPress Version: 5.1

/**
 * Strips slashes from in front of quotes.
 *
 * This function changes the character sequence `\"` to just `"`. It leaves all other
 * slashes alone. The quoting from `preg_replace(//e)` requires this.
 *
 * @since 1.0.0
 *
 * @param string $string String to strip slashes from.
 * @return string Fixed string with quoted slashes.
 */
function wp_kses_stripslashes($string)
{
    return preg_replace('%\\\\"%', '"', $string);
}

WordPress Version: 3.7

/**
 * Strips slashes from in front of quotes.
 *
 * This function changes the character sequence \" to just ". It leaves all
 * other slashes alone. It's really weird, but the quoting from
 * preg_replace(//e) seems to require this.
 *
 * @since 1.0.0
 *
 * @param string $string String to strip slashes
 * @return string Fixed string with quoted slashes
 */
function wp_kses_stripslashes($string)
{
    return preg_replace('%\\\\"%', '"', $string);
}