Fix not stripping backslashes in DispatchType::Regex::uri_for_action
[catagits/Catalyst-Runtime.git] / lib / Catalyst / DispatchType / Regex.pm
index 0d6da04..4b1beae 100644 (file)
@@ -151,6 +151,7 @@ sub uri_for_action {
             my $re = "$orig";
             $re =~ s/^\^//;
             $re =~ s/\$$//;
+            $re =~ s/\\([^\\])/$1/g;
             my $final = '/';
             my @captures = @$captures;
             while (my ($front, $rest) = split(/\(/, $re, 2)) {