wp_kses_stripslashes

Strips slashes from in front of quotes.

Description

(string) wp_kses_stripslashes( (string) $string ); 

This function changes the character sequence \" to just . It leaves all other slashes alone. Its really weird, but the quoting from preg_replace(//e) seems to require this.

Returns (string)

Fixed string with quoted slashes

Parameters (1)

0. $string (string)
String to strip slashes

Usage

  1. if ( !function_exists( 'wp_kses_stripslashes' ) ) { 
  2. require_once ABSPATH . WPINC . '/kses.php'; 
  3.  
  4. // String to strip slashes 
  5. $string = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = wp_kses_stripslashes($string); 
  9.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/kses.php  
  1. function wp_kses_stripslashes($string) { 
  2. return preg_replace('%\\\\"%', '"', $string);