Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

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

Report information
The Basics
Id: 80177
Status: resolved
Priority: 0/
Queue: URI-Encode

People
Owner: MITHUN [...] cpan.org
Requestors: Dan [...] DWright.Org
Cc:
AdminCc:

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



Subject: Bug with double_encode in URI::Encode
Presently, URI::Encode will crash if you enabled the double_encode parameter and try to encode a string containing a percent character: perl -MURI::Encode -e 'print URI::Encode->new({double_encode=>1})->encode("This is a %20 test")' Use of uninitialized value $char in exists at /usr/local/lib/perl5/site_perl/5.10.1/URI/Encode.pm line 149. The reason for this is that you are failing to capture the percent symbol in your regex in encode(): 102 if ($double_encode) { $data =~ s{\%}{$self->_get_encoded_char($1)}gex; } It should be this instead: 102 if ($double_encode) { $data =~ s{(\%)}{$self->_get_encoded_char($1)}gex; } Regards, -Dan
Fixed and uploaded in 0.8. Thanks! -- Mithun