Subject: | URI::Encode::uri_encode doesn't work, requires URI::Escape::uri_escape instead |
Date: | Fri, 4 Jul 2014 02:35:58 -0400 |
To: | bug-Reddit-Client [...] rt.cpan.org |
From: | Chloe <starrychloe [...] oliveyou.net> |
URI::Encode::uri_encode doesn't work. When trying to submit text
comment with an ampersand, the JSON is not fully encoded when it
sends the request and the request fails. It chops off the text at
the ampersand silently without encoding the full text. The comment
is truncated. It is trying to form-encode the request and it thinks
the ampersand is a new CGI variable.
DB<81> p URI::Encode::uri_encode('abc&def')
abc&def
DB<82> p URI::Escape::uri_escape('abc&def')
abc%26def
The problem is in Reddit::Client::Request line 9 and 51, build_query().
Perl 5.14
Reddit::Client 0.7
DB<81> p URI::Encode::uri_encode('abc&def')
abc&def
DB<82> p URI::Escape::uri_escape('abc&def')
abc%26def
The problem is in Reddit::Client::Request line 9 and 51, build_query().
Perl 5.14
Reddit::Client 0.7