Ticket #6060 (closed bug: duplicate)

Opened 3 years ago

Last modified 8 months ago

Cannot compress jquery.ui.core.js with YUI Compressor (caused by non-breaking space character)

Reported by: stevekwan Owned by:
Priority: minor Milestone:
Component: ui.core Version: 1.8.4
Keywords: yui compressor Cc:
Blocking: Blocked by:

Description

When attempting to compress jquery.ui.core.js using Yahoo's YUI Compressor, the resulting minimized JavaScript generates an "illegal character" error.

On line 27 of the uncompressed version of the jQuery UI core, there is a non-breaking space character (hex code 0xA0). This is what's causing the YUI Compressor problems. The line reads:

var proto = $.ui[ module ].prototype;

The space between "module" and "]" is actually a character with hex code 0xA0. I assume it should be a regular space. Replacing this character with a normal space fixes the problem, and allows the file to be compressed with the YUI Compressor.

This issue also appears in jquery.ui.tabs.js v1.8.4 on line 606. I've filed a separate bug report for this.

And yes, I know that I could just use the pre-compressed version of jquery.ui.core without any problems. :) But I'm working on a project that requires all JavaScript to be minimized and packaged together with the YUI Compressor.

Change History

comment:1 Changed 3 years ago by scott.gonzalez

  • Status changed from new to closed
  • Resolution set to duplicate

Duplicate of #5921.

comment:2 Changed 8 months ago by scott.gonzalez

  • Milestone TBD deleted

Milestone TBD deleted

Note: See TracTickets for help on using tickets.