Ticket #42182: wp-esc-js-handle-unicode-breaks.diff
File wp-esc-js-handle-unicode-breaks.diff, 686 bytes (added by , 6 years ago) |
---|
-
src/wp-includes/formatting.php
3921 3921 $safe_text = preg_replace( '/&#(x)?0*(?(1)27|39);?/i', "'", stripslashes( $safe_text ) ); 3922 3922 $safe_text = str_replace( "\r", '', $safe_text ); 3923 3923 $safe_text = str_replace( "\n", '\\n', addslashes( $safe_text ) ); 3924 if ( seems_utf8( $safe_text ) ) { 3925 $safe_text = str_replace( array( "\xe2\x80\xa8", "\xe2\x80\xa9" ), array( "\u2028", "\u2029" ), $safe_text ); 3926 } 3924 3927 /** 3925 3928 * Filters a string cleaned and escaped for output in JavaScript. 3926 3929 *