privoxy-regression-test.pl: Allow '[' and ']' in URLs
[privoxy.git] / tools / privoxy-regression-test.pl
index cec557a..69a9ee7 100755 (executable)
@@ -38,7 +38,7 @@ use strict;
 use Getopt::Long;
 
 use constant {
-    PRT_VERSION => 'Privoxy-Regression-Test 0.7',
+    PRT_VERSION => 'Privoxy-Regression-Test 0.7.1',
  
     CURL => 'curl',
 
@@ -132,7 +132,7 @@ sub parse_tag ($) {
 sub check_for_forbidden_characters ($) {
 
     my $string = shift;
-    my $allowed = '[-=\dA-Za-z~{}:./();\t ,+@"_%?&*^]';
+    my $allowed = '[-=\dA-Za-z~{}\[\]:./();\t ,+@"_%?&*^]';
 
     unless ($string =~ m/^$allowed*$/o) {
         my $forbidden = $string;
@@ -1452,6 +1452,8 @@ sub get_page_with_curl ($) {
     $curl_line .= " --user-agent '" . PRT_VERSION . "' ";
     # We aren't too patient
     $curl_line .= " --max-time '" . get_cli_option('max-time') . "' ";
+    # We don't want curl to treat "[]", "{}" etc. special
+    $curl_line .= " --globoff ";
 
     $curl_line .= $parameters;
     # XXX: still necessary?