Make WordPress Core


Ignore:
Timestamp:
03/01/2013 05:14:09 PM (12 years ago)
Author:
ryan
Message:

Use wp_unslash() instead of stripslashes() and stripslashes_deep(). Use wp_slash() instead of add_magic_quotes().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/plugin-editor.php

    r23554 r23567  
    2929
    3030if ( isset($_REQUEST['file']) )
    31     $plugin = stripslashes($_REQUEST['file']);
     31    $plugin = wp_unslash($_REQUEST['file']);
    3232
    3333if ( empty($plugin) ) {
     
    4040if ( empty($file) )
    4141    $file = $plugin_files[0];
    42 else
    43     $file = stripslashes($file);
    4442
    4543$file = validate_file_to_edit($file, $plugin_files);
     
    5351    check_admin_referer('edit-plugin_' . $file);
    5452
    55     $newcontent = stripslashes($_POST['newcontent']);
     53    $newcontent = wp_unslash( $_POST['newcontent'] );
    5654    if ( is_writeable($real_file) ) {
    5755        $f = fopen($real_file, 'w+');
Note: See TracChangeset for help on using the changeset viewer.