Skip to content
Permalink
Browse files

Use Uglify's ascii_only to avoid converting UTF-8 escapes.

  • Loading branch information...
dmethvin committed Oct 11, 2012
1 parent a60fed4 commit 798a7a7ea2cb612411b3d9fd87e8b0e894b27de8
Showing with 6 additions and 3 deletions.
  1. +5 −1 grunt.js
  2. +1 −2 src/core.js
@@ -112,7 +112,11 @@ module.exports = function( grunt ) {
],
tasks: "dev"
},
uglify: {}
uglify: {
codegen: {
ascii_only: true
}
}
});

// Default grunt.
@@ -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 ?
"" :

1 comment on commit 798a7a7

@curiousdannii

This comment has been minimized.

Copy link

commented on 798a7a7 Oct 11, 2012

I think I've made it in life now!

Please sign in to comment.
You can’t perform that action at this time.