Make WordPress Core


Ignore:
Timestamp:
07/20/2012 03:14:26 PM (12 years ago)
Author:
nacin
Message:

Only run stripslashes() in stripslashes_deep() for strings, not other scalar values. props Kawauso, knutsp. props coffee2code for [UT698]. fixes #18026.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/formatting.php

    r21250 r21292  
    13811381 * @since 2.0.0
    13821382 *
    1383  * @param array|string $value The array or string to be stripped.
    1384  * @return array|string Stripped array (or string in the callback).
     1383 * @param mixed $value The value to be stripped.
     1384 * @return mixed Stripped value.
    13851385 */
    13861386function stripslashes_deep($value) {
     
    13921392            $value->{$key} = stripslashes_deep( $data );
    13931393        }
    1394     } else {
     1394    } elseif ( is_string( $value ) ) {
    13951395        $value = stripslashes($value);
    13961396    }
Note: See TracChangeset for help on using the changeset viewer.