Skip to content
Permalink
Browse files
apply patch from RT#96941 to fix new "\C is deprecated in regex" warn…
…ing in 5.21.2
  • Loading branch information
karenetheridge committed Jul 12, 2014
1 parent 90e11b8 commit 7e03cdd3e5d25df5556a36dbfcd5d6cbcd676afb
Showing with 11 additions and 1 deletion.
  1. +3 −0 Changes
  2. +8 −1 URI/Escape.pm
@@ -7,6 +7,9 @@
5.21.1)
- remove all remaining uses of "use vars"

Eric Brine:
- fixed new "\C is deprecated in regex" warning in 5.21.2 (RT#96941)


2014-07-01 Karen Etheridge <ether@cpan.org>

@@ -202,8 +202,15 @@ sub uri_unescape {
$str;
}

# XXX FIXME escape_char is buggy as it assigns meaning to the string's storage format.
sub escape_char {
return join '', @URI::Escape::escapes{$_[0] =~ /(\C)/g};
if (utf8::is_utf8($_[0])) {
my $s = $_[0];
utf8::encode($s);
unshift(@_, $s);
}

return join '', @URI::Escape::escapes{$_[0] =~ /(.)/sg};
}

1;

0 comments on commit 7e03cdd

Please sign in to comment.