Skip Menu |

This queue is for tickets about the Reddit-Client CPAN distribution.

Report information
The Basics
Id: 96930
Status: resolved
Priority: 0/
Queue: Reddit-Client

People
Owner: JEFFOBER [...] cpan.org
Requestors: starrychloe [...] oliveyou.net
Cc:
AdminCc:

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



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

I've pushed a fix to github - can you verify that you are not seeing the behavior anymore with the latest before I publish to cpan? https://github.com/jsober/Reddit-API Thank you for the bug report! -Jeff Ober