Skip to main content

Bug Tracker

Side navigation

#5402 closed bug (invalid)

Opened October 21, 2009 08:02PM UTC

Closed December 16, 2009 02:39AM UTC

jquery-1.3.2-min.js add space between return and (E.value||"").replace(/\\r/g,"")

Reported by: pottermm Owned by:
Priority: minor Milestone: 1.4
Component: core Version: 1.3.2
Keywords: space juniper min file Cc:
Blocked by: Blocking:
Description

jquery-1.3.2-min.js add space between

return
and
(E.value||"").replace(/\\r/g,"")

When using juniper network protect it manipulates javascript files for it to work. Juniper creates a wrapper function around

(E.value||"").replace(/\\r/g,"")
causing it to be an invalid function.

it becomes

returnDanaReplaceFunction(E.value||"").replace(/\\r/g,"")
which is invalid.

it should be

return DanaReplaceFunction(E.value||"").replace(/\\r/g,"")

Attachments (0)
Change History (3)

Changed October 22, 2009 12:50AM UTC by pbcomm comment:1

That's Juniper's problem and not a problem with jquery.

Changed October 22, 2009 01:39AM UTC by dmethvin comment:2

description: jquery-1.3.2-min.js add space between return and (E.value||"").replace(/\\r/g,"") \ \ When using juniper network protect it manipulates javascript files for it to work. Juniper creates a wrapper function around (E.value||"").replace(/\\r/g,"") causing it to be an invalid function. \ \ it becomes returnDanaReplaceFunction(E.value||"").replace(/\\r/g,"") which is invalid. \ \ it should be return DanaReplaceFunction(E.value||"").replace(/\\r/g,"") \ \ jquery-1.3.2-min.js add space between {{{return}}} and {{{(E.value||"").replace(/\\r/g,"")}}} \ \ When using juniper network protect it manipulates javascript files for it to work. Juniper creates a wrapper function around {{{(E.value||"").replace(/\\r/g,"")}}} causing it to be an invalid function. \ \ it becomes {{{returnDanaReplaceFunction(E.value||"").replace(/\\r/g,"")}}} which is invalid. \ \ it should be {{{return DanaReplaceFunction(E.value||"").replace(/\\r/g,"")}}} \ \

(reformatted the original post)

I think this is referring to line 449 in the uncompressed 1.3.2 file, which is inside the

val()
method:

  // Everything else, we just grab the value
  return (elem.value || "").replace(/\\r/g, "");

The compressed code looks like this:

  return(E.value||"").replace(/\\r/g,"")

So you are saying that adding a space between the return and the ( would satisfy Juniper's (broken) parser? We're using YUI compressor to create the minified version, and it rightly is removing that space because it's not needed. I'm not sure how it can be retained in the minified version.

Changed December 16, 2009 02:39AM UTC by dmethvin comment:3

resolution: → invalid
status: newclosed

Closed for inactivity; try it with jQuery 1.4.