Make WordPress Core


Ignore:
Timestamp:
06/20/2009 05:42:24 PM (16 years ago)
Author:
westi
Message:

Introduce _deep_replace() and use it to improve the stripping of percent encoded values from urls. Fixes #10226 for trunk.

File:
1 edited

Legend:

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

    r11610 r11615  
    881881
    882882    // remove %0d and %0a from location
    883     $strip = array('%0d', '%0a');
    884     $found = true;
    885     while($found) {
    886         $found = false;
    887         foreach( (array) $strip as $val ) {
    888             while(strpos($location, $val) !== false) {
    889                 $found = true;
    890                 $location = str_replace($val, '', $location);
    891             }
    892         }
    893     }
     883    $strip = array('%0d', '%0a', '%0D', '%0A');
     884    $location = _deep_replace($strip, $location);
    894885    return $location;
    895886}
Note: See TracChangeset for help on using the changeset viewer.