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

Thanks @curiousdannii!
This commit is contained in:
Dave Methvin 2012-10-11 09:38:44 -04:00
parent a60fed4dec
commit 798a7a7ea2
2 changed files with 6 additions and 3 deletions

View File

@ -112,7 +112,11 @@ module.exports = function( grunt ) {
],
tasks: "dev"
},
uglify: {}
uglify: {
codegen: {
ascii_only: true
}
}
});
// Default grunt.

View 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 ?
"" :