WordPress.org

Make WordPress Core

Changeset 18738


Ignore:
Timestamp:
09/21/11 19:05:06 (3 years ago)
Author:
ryan
Message:

Run the sanitize_option_* filter for all options in sanitize_option(). Add some sanity checks for the permalink options while in there. fixes #18737

File:
1 edited

Legend:

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

    r18732 r18738  
    24632463            } 
    24642464            break; 
     2465 
    24652466        case 'new_admin_email': 
    24662467            $value = sanitize_email($value); 
     
    24712472            } 
    24722473            break; 
     2474 
    24732475        case 'thumbnail_size_w': 
    24742476        case 'thumbnail_size_h': 
     
    25642566            } 
    25652567            break; 
     2568 
    25662569        case 'WPLANG': 
    25672570            $allowed = get_available_languages(); 
     
    25792582            break; 
    25802583 
    2581         default : 
    2582             $value = apply_filters("sanitize_option_{$option}", $value, $option); 
     2584        case 'permalink_structure': 
     2585        case 'category_base': 
     2586        case 'tag_base': 
     2587            $value = esc_url_raw( $value ); 
     2588            $value = str_replace( 'http://', '', $value ); 
    25832589            break; 
    25842590    } 
     2591 
     2592    $value = apply_filters("sanitize_option_{$option}", $value, $option); 
    25852593 
    25862594    return $value; 
Note: See TracChangeset for help on using the changeset viewer.