]> source.dussan.org Git - jquery.git/commitdiff
Fix #12690. Avoid use of UTF-8 chars in final files.
authorDave Methvin <dave.methvin@gmail.com>
Wed, 10 Oct 2012 17:00:45 +0000 (13:00 -0400)
committerDave Methvin <dave.methvin@gmail.com>
Wed, 10 Oct 2012 17:00:45 +0000 (13:00 -0400)
src/core.js
src/event.js

index 709467168907bf67568176049b9449730c932ab6..638b5c62fc216143190b0a9edf708a4ee4b14443 100644 (file)
@@ -605,7 +605,8 @@ jQuery.extend({
        },
 
        // 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 ) {
                        return text == null ?
                                "" :
index c92dd4206115c9539ecbf5cc46d723fc2c74b185..153045ac5b02f5fdd117d9f4ec87bcd32dc27955 100644 (file)
@@ -603,7 +603,7 @@ jQuery.removeEvent = document.removeEventListener ?
 
                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
                        if ( typeof elem[ name ] === "undefined" ) {
                                elem[ name ] = null;