Ticket #5402 (closed bug: invalid)
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: | |
| Blocking: | Blocked by: |
Description (last modified by dmethvin) (diff)
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,"")
Change History
comment:2 Changed 4 years ago by dmethvin
- Description modified (diff)
(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.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

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