WordPress.org

Make WordPress Core

Ticket #19877: 19877.2.diff

File 19877.2.diff, 929 bytes (added by MikeHansenMe, 2 years ago)

Updated patch path relative from wp folder

  • wp-includes/kses.php

     
    974974/** 
    975975 * Strips slashes from in front of quotes. 
    976976 * 
    977  * This function changes the character sequence \" to just ". It leaves all 
     977 * This function changes the character sequence \" or \' to just " or '. It leaves all 
    978978 * other slashes alone. It's really weird, but the quoting from 
    979979 * preg_replace(//e) seems to require this. 
    980980 * 
     
    983983 * @param string $string String to strip slashes 
    984984 * @return string Fixed string with quoted slashes 
    985985 */ 
    986 function wp_kses_stripslashes($string) { 
    987         return preg_replace('%\\\\"%', '"', $string); 
     986function wp_kses_stripslashes( $string ) { 
     987        $string = preg_replace( '%\\\\"%', '"', $string ); 
     988        $string = preg_replace( "%\\\\'%", "'", $string ); 
     989         
     990        return $string; 
    988991} 
    989992 
    990993/**