]> source.dussan.org Git - jquery.git/commitdiff
Use Uglify's ascii_only to avoid converting UTF-8 escapes.
authorDave Methvin <dave.methvin@gmail.com>
Thu, 11 Oct 2012 13:38:44 +0000 (09:38 -0400)
committerDave Methvin <dave.methvin@gmail.com>
Thu, 11 Oct 2012 13:39:21 +0000 (09:39 -0400)
Thanks @curiousdannii!

grunt.js
src/core.js

index a2db873a72147df403018befc374689137e59913..53d990fb018c52bddb572cb69513f8e67cb887bf 100644 (file)
--- a/grunt.js
+++ b/grunt.js
@@ -112,7 +112,11 @@ module.exports = function( grunt ) {
                        ],
                        tasks: "dev"
                },
-               uglify: {}
+               uglify: {
+                       codegen: {
+                               ascii_only: true
+                       }
+               }
        });
 
        // Default grunt.
index 638b5c62fc216143190b0a9edf708a4ee4b14443..73c24dc9bae694075e58ae5fde06eae2b163f7d7 100644 (file)
@@ -605,8 +605,7 @@ jQuery.extend({
        },
 
        // Use native String.trim function wherever possible
-       // Uglify converts escapes to UTF-8; this circumvents (#12690)
-       trim: core_trim && !core_trim.call( String.fromCharCode( 0xFEFF, 0xA0 ) ) ?
+       trim: core_trim && !core_trim.call("\xFEFF\xA0") ?
                function( text ) {
                        return text == null ?
                                "" :