Ticket #7041: no-cr-for-js-escape.diff
File no-cr-for-js-escape.diff, 631 bytes (added by , 16 years ago) |
---|
-
wp-includes/formatting.php
1183 1183 function js_escape($text) { 1184 1184 $safe_text = wp_specialchars($text, 'double'); 1185 1185 $safe_text = preg_replace('/&#(x)?0*(?(1)27|39);?/i', "'", stripslashes($safe_text)); 1186 $safe_text = preg_replace("/\r?\n/", "\\n", addslashes($safe_text)); 1186 $safe_text = str_replace("\r", "", $safe_text); 1187 $safe_text = str_replace("\n", "\\n", addslashes($safe_text)); 1187 1188 return apply_filters('js_escape', $safe_text, $text); 1188 1189 } 1189 1190