[regression] syntax errors in minified version of jquery

Bug #811477 reported by Fabien Tassin
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
jquery (Debian)
Fix Released
Unknown
jquery (Ubuntu)
Fix Released
High
Dustin Kirkland 
musica (Ubuntu)
Fix Released
High
Unassigned

Bug Description

libjs-jquery 1.6.2-1ubuntu1 in oneiric introduced a regression compared to 1.6.1-1ubuntu1.

/usr/share/javascript/jquery/jquery.min.js contains 2 syntax errors, breaking all my webapps using jquery.

The original code shows:

/usr/share/javascript/jquery/jquery.js:
======
6839 serializeArray: function() {
6840 return this.map(function(){
6841 return this.elements ? jQuery.makeArray( this.elements ) : this;
6842 })
6843 .filter(function(){
6844 return this.name && !this.disabled &&
6845 ( this.checked || rselectTextarea.test( this.nodeName ) ||
6846 rinput.test( this.type ) );
6847 })
6848 .map(function( i, elem ){
6849 var val = jQuery( this ).val();
6850
6851 return val == null ?
6852 null :
6853 jQuery.isArray( val ) ?
6854 jQuery.map( val, function( val, i ){
6855 return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
6856 }) :
6857 { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
6858 }).get();
6859 }
6860 });
====

in the minified versions, the replace strings of lines 6855 & 6857 are turned into "^Q
"
leading to syntax errors in Chromium & Firefox.

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: libjs-jquery 1.6.2-1ubuntu1 [modified: usr/share/javascript/jquery/jquery.min.js]
ProcVersionSignature: Ubuntu 3.0.0-5.6-generic 3.0.0-rc7
Uname: Linux 3.0.0-5-generic i686
NonfreeKernelModules: nvidia
Architecture: i386
Date: Sat Jul 16 13:24:15 2011
Dependencies:

PackageArchitecture: all
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/usr/bin/tcsh
SourcePackage: jquery
UpgradeStatus: Upgraded to oneiric on 2011-05-09 (68 days ago)

Fabien Tassin (fta)
Changed in jquery (Ubuntu):
importance: Undecided → High
Revision history for this message
Fabien Tassin (fta) wrote :

There are more syntax errors where "\\" are turned into "\".

Fabien Tassin (fta)
summary: - [regression] syntax error in minified version of jquery
+ [regression] syntax errors in minified version of jquery
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Confirming. This has broken musica too.

Changed in jquery (Ubuntu):
status: New → Confirmed
Changed in musica (Ubuntu):
status: New → Confirmed
importance: Undecided → High
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Note that the Google hosted one works just fine:
 * http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js

It seems that it's the Debian packaged/built/compressed jquery.min.js that's affected.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package musica - 2.17-0ubuntu1

---------------
musica (2.17-0ubuntu1) oneiric; urgency=low

  [ Serge Hallyn ]
  * debian/cron.hourly: add -L to find options to support symlinks under
    /usr/share/music/musica.

  [ Dustin Kirkland ]
  * jplayer.php: LP: #811477
    - use the google hosted jquery.min.js until the local one in Debian/Ubuntu
      gets fixed
  * debian/cron.hourly, index.php, jplayer.php:
    - partial support for m4a
  * debian/control, index.php:
    - remove that nasty backtick call to eyeD3, use php-id3 instead
 -- Dustin Kirkland <email address hidden> Thu, 28 Jul 2011 20:23:17 -0500

Changed in musica (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Marcelo Jorge Vieira (metal-alucinados) wrote :

Tthis bug only happens in Ubuntu version. See http://bugs.debian.org/635978

Revision history for this message
Fabien Tassin (fta) wrote :

it's because in ubuntu, it has been built with yui-compressor 2.4.6+debian1-1 which dropped rhino. It has been fixed since with 2.4.6+rhino17R2-1 in debian (already synched in ubuntu).

see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=630542

so the ubuntu version must be rebuilt, most probably with a Build-deps bump.

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Fabien,

Thanks for the info. I'm sending an Ubuntu rebuild through now. I'm not going to bother with the build-dep bump, so that we don't get out of sync with debian there. It shouldn't be needed, as this build should automatically pick up the new yui-compressor.

Dustin

Changed in jquery (Ubuntu):
assignee: nobody → Dustin Kirkland (kirkland)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package jquery - 1.6.2-1ubuntu2

---------------
jquery (1.6.2-1ubuntu2) oneiric; urgency=low

  * Rebuild, to pick up fixes to the yui-compressor toolchain,
    LP: #811477
 -- Dustin Kirkland <email address hidden> Wed, 03 Aug 2011 12:56:13 -0500

Changed in jquery (Ubuntu):
status: Confirmed → Fix Released
Changed in jquery (Debian):
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.