Skip Menu |

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

Report information
The Basics
Id: 55175
Status: resolved
Priority: 0/
Queue: URI-Escape-JavaScript

People
Owner: Nobody in particular
Requestors: boekm [...] hotmail.com
Cc:
AdminCc:

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



Subject: incorrect unescape behaviour
Given the string "weekendje weg van €1000", js_escape returns "weekendje%20weg%20van%20%u20AC1000" Using this string in js_unescape, "%u20AC1000" is mistreated. Whereas only the first 4 hex chars ("20AC") should be converted back, js_unescape also wrongly includes the "1000" (because of a greedy regex). I fixed this myself by making the regex less greedy, but thought I'd pass my findings here too Cheers
thanks for your reporting. it's fixed in version 0.04 (just shipped it. it will be available on cpan soon) thank you. On Wed Mar 03 05:38:45 2010, boekm wrote: Show quoted text
> Given the string "weekendje weg van €1000", js_escape returns > "weekendje%20weg%20van%20%u20AC1000" > > Using this string in js_unescape, "%u20AC1000" is mistreated. Whereas > only the first 4 hex chars ("20AC") should be converted back, > js_unescape also wrongly includes the "1000" (because of a greedy regex). > > I fixed this myself by making the regex less greedy, but thought I'd > pass my findings here too > > Cheers