Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the JavaScript-Minifier CPAN distribution.

Report information
The Basics
Id: 46165
Status: rejected
Priority: 0/
Queue: JavaScript-Minifier

People
Owner: Nobody in particular
Requestors: tao.wang.pro [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: bug found when minify jquery-1.3.2.js
Date: Sun, 17 May 2009 22:06:49 -0700
To: <bug-JavaScript-Minifier [...] rt.cpan.org>
From: "Tao Wang" <tao.wang.pro [...] gmail.com>
Hi, people, Basically, I did something like JavaScript::Minifier::XS::minify(jquery-1.3.2.js), (sure you can download this jquery from http://code.google.com/p/jqueryjs/downloads/detail?name=jquery-1.3.2.js) The result code has js error, really took me a while, i found minify did the wrong thing. The original file 3384: accepts: { xml: "application/xml, text/xml", html: "text/html", script: "text/javascript, application/javascript", json: "application/json, text/javascript", text: "text/plain", _default: "*/*" } .... // Set the Accepts header for the server, depending on the dataType xhr.setRequestHeader("Accept", s.dataType && s.accepts[ s.dataType ] ? 3534: s.accepts[ s.dataType ] + ", */*" : s.accepts._default ); I guess minify() replace /*.*?*/s with blank. But see the code above contain two "*/*", the result is totally wrong accepts:{ xml: "application/xml, text/xml", html: "text/html", script: "text/javascript, application/javascript", json: "application/json, text/javascript", text: "text/plain", _default: "**" : s.accepts._default ); I have no recommend at this moment. But I am 99% sure this is the cause. JavaScript::Minifier 1.05 Perl 5.8.8 CentOS Good luck. Tao Programmer tao@eventful.com
You reported in JavaScript::Minifier, but the sample code you're using is JavaScript::Minifier::XS. I can't reproduce it with either module. Sounds like it was a bug in ::XS, and judging by the age of this ticket, it was already fixed :) Thanks for reporting. -- Cheers, ZZ [ https://metacpan.org/author/ZOFFIX ]