From 798a7a7ea2cb612411b3d9fd87e8b0e894b27de8 Mon Sep 17 00:00:00 2001 From: Dave Methvin Date: Thu, 11 Oct 2012 09:38:44 -0400 Subject: [PATCH] Use Uglify's ascii_only to avoid converting UTF-8 escapes. Thanks @curiousdannii! --- grunt.js | 6 +++++- src/core.js | 3 +-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/grunt.js b/grunt.js index a2db873a7..53d990fb0 100644 --- a/grunt.js +++ b/grunt.js @@ -112,7 +112,11 @@ module.exports = function( grunt ) { ], tasks: "dev" }, - uglify: {} + uglify: { + codegen: { + ascii_only: true + } + } }); // Default grunt. diff --git a/src/core.js b/src/core.js index 638b5c62f..73c24dc9b 100644 --- a/src/core.js +++ b/src/core.js @@ -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 ? "" : -- 2.39.5