Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

dots in labels must be escaped, or we fail with an 'api route not rec…

…ognized' error
  • Loading branch information...
commit 0e036597f15673d9c01107444835342d86a70034 1 parent 057cab2
Dave O'Neill authored May 22, 2010

Showing 1 changed file with 3 additions and 3 deletions. Show diff stats Hide diff stats

  1. 6  gcode-issue-import
6  gcode-issue-import
@@ -248,7 +248,7 @@ sub import_issue
248 248
 
249 249
 package Private::Net::GitHub::Issue;
250 250
 use Carp qw(confess);
251  
-
  251
+use URI::Escape;
252 252
 
253 253
 sub _throttle_request_rate
254 254
 {
@@ -290,14 +290,14 @@ sub add_label
290 290
 {
291 291
 	my ($self, $label) = @_;
292 292
 	_throttle_request_rate();
293  
-	_die_if_error( $self->{_gi}->add_label($self->{number}, $label ) );
  293
+	_die_if_error( $self->{_gi}->add_label($self->{number}, uri_escape($label, "^A-Za-z0-9\-_~") ) );
294 294
 }
295 295
 
296 296
 sub remove_label
297 297
 {
298 298
 	my ($self, $label) = @_;
299 299
 	_throttle_request_rate();
300  
-	_die_if_error( $self->{_gi}->remove_label($self->{number}, $label ) );
  300
+	_die_if_error( $self->{_gi}->remove_label($self->{number}, uri_escape($label, "^A-Za-z0-9\-_~" ) ) );
301 301
 }
302 302
 
303 303
 sub edit

0 notes on commit 0e03659

Please sign in to comment.
Something went wrong with that request. Please try again.