Ticket #9716: 9716.2.patch
File 9716.2.patch, 1.2 KB (added by , 13 years ago) |
---|
-
wp-admin/plugin-editor.php
52 52 53 53 check_admin_referer('edit-plugin_' . $file); 54 54 55 $newcontent = str ipslashes($_POST['newcontent']);55 $newcontent = str_replace( array( "\r\n", "\r" ), "\n", stripslashes( $_POST['newcontent'] ) ); 56 56 if ( is_writeable($real_file) ) { 57 57 $f = fopen($real_file, 'w+'); 58 58 fwrite($f, $newcontent); -
wp-admin/theme-editor.php
85 85 switch( $action ) { 86 86 case 'update': 87 87 check_admin_referer( 'edit-theme_' . $file . $stylesheet ); 88 $newcontent = str ipslashes( $_POST['newcontent']);88 $newcontent = str_replace( array( "\r\n", "\r" ), "\n", stripslashes( $_POST['newcontent'] ) ); 89 89 $location = 'theme-editor.php?file=' . urlencode( $relative_file ) . '&theme=' . urlencode( $stylesheet ) . '&scrollto=' . $scrollto; 90 90 if ( is_writeable( $file ) ) { 91 91 //is_writable() not always reliable, check return value. see comments @ http://uk.php.net/is_writable