Skip to content

Commit

Permalink
use uri_escape_utf8 instead of uri_escape
Browse files Browse the repository at this point in the history
since string can be in UTF8, we have to use uri_escape_utf8()
  • Loading branch information
Gonéri Le Bouder authored and guillomovitch committed May 15, 2012
1 parent 73d1400 commit 37dfcd0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/FusionInventory/Agent/HTTP/Client/Fusion.pm
Expand Up @@ -29,11 +29,11 @@ sub _prepareVal {
return '' unless length($val);

# forbid to long argument.
while (length(uri_escape($val)) > 1500) {
while (length(URI::Escape::uri_escape_utf8($val)) > 1500) {
$val =~ s/^.{5}//;
}

return uri_escape($val);
return URI::Escape::uri_escape_utf8($val);
}

sub send { ## no critic (ProhibitBuiltinHomonyms)
Expand Down

0 comments on commit 37dfcd0

Please sign in to comment.