YUILibrary - Open source JavaScript and CSS for building richly interactive software.
Fork YUI on GitHub

YUI 2.x

Ticket #2527983 (checkedin defect)

Reporter


bzbugs
Opened: 07/10/09
Last modified: 02/2/10
Status: checkedin
Type: defect
Resolution: fixed

Owner


Isaac Z. Schlueter
Target Release: 2.4.3
Priority: P3 (normal)
Summary: [bz 2451000] YUI compressor adding semicolon in @import
Description:

If I have an import path that contains {}, yui compressor adds a semicolon at the end.

> @import "../${TEST}/test.css";
compresses to
> @import "../${TEST;}/test.css";

Type: defect Observed in Version: 2.4.2
Component: YUICompressor Severity: S3 (normal)
Assigned To: Isaac Z. Schlueter Target Release: 2.4.3
Location: Library Code Priority: P3 (normal)
Tags: Relates To:
Browsers: N/A
URL:
Test Information:

Change History

George

YUI Developer

Posted: 09/23/09

Isaac Z. Schlueter

YUI Contributor

Posted: 09/23/09
  • milestone changed to FUTURE
  • status changed from assigned to accepted

Isaac Z. Schlueter

YUI Contributor

Posted: 10/19/09
  • status changed from accepted to checkedin

This is fixed now, but only incidentally. Now, if you had import "../${TEST;}/blah.css", then it would fail by *removing* the ;.

In general, strings are sometimes borked by YUICompressor, and with the current regular-expression based approach, it is highly non-trivial to avoid this. A better long-term approach is to use a proper CSS parser. That's planned and currently being investigated, but won't be available for a while.

I'm marking this as closed, but please don't take this to mean that strings are safe from munging now. They won't be for some time.

George

YUI Developer

Posted: 02/2/10
  • milestone changed from FUTURE to 2.4.3

George

YUI Developer

Posted: 02/2/10
  • resolution changed to fixed