Make WordPress Core


Ignore:
Timestamp:
07/06/2005 01:12:38 AM (21 years ago)
Author:
ryan
Message:

Stripslashes doesn't work on arrays. Add stripslashes_deep(). Props: Mike Little

File:
1 edited

Legend:

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

    r2699 r2700  
    531531
    532532    return $wpdb->escape($gpc);
     533}
     534
     535
     536function stripslashes_deep($value)
     537{
     538   $value = is_array($value) ?
     539               array_map('stripslashes_deep', $value) :
     540               stripslashes($value);
     541
     542   return $value;
    533543}
    534544
Note: See TracChangeset for help on using the changeset viewer.