Fix #12690. Avoid use of UTF-8 chars in final files.

This commit is contained in:
Dave Methvin 2012-10-10 13:00:45 -04:00
parent 5a21150c9b
commit a60fed4dec
2 changed files with 3 additions and 2 deletions

View File

@ -605,7 +605,8 @@ jQuery.extend({
}, },
// Use native String.trim function wherever possible // Use native String.trim function wherever possible
trim: core_trim && !core_trim.call("\uFEFF\xA0") ? // Uglify converts escapes to UTF-8; this circumvents (#12690)
trim: core_trim && !core_trim.call( String.fromCharCode( 0xFEFF, 0xA0 ) ) ?
function( text ) { function( text ) {
return text == null ? return text == null ?
"" : "" :

View File

@ -603,7 +603,7 @@ jQuery.removeEvent = document.removeEventListener ?
if ( elem.detachEvent ) { if ( elem.detachEvent ) {
// #8545, #7054, preventing memory leaks for custom events in IE6-8 // #8545, #7054, preventing memory leaks for custom events in IE6-8
// detachEvent needed property on element, by name of that event, to properly expose it to GC // detachEvent needed property on element, by name of that event, to properly expose it to GC
if ( typeof elem[ name ] === "undefined" ) { if ( typeof elem[ name ] === "undefined" ) {
elem[ name ] = null; elem[ name ] = null;