summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlookshe <lookshe@fumuga.com>2013-07-29 14:17:23 +0200
committerlookshe <lookshe@fumuga.com>2013-07-29 14:17:23 +0200
commit3bc9de5a3c00144e24b4bbc04f43c174b5303a6a (patch)
treeac9262d948c53c1fca470698900bc1df5ce0129b
parentb3b232e37020499521a139e6111779e8fa8494bb (diff)
some more special characters masked and url escaped for handling hash
-rw-r--r--file.pl5
1 files changed, 4 insertions, 1 deletions
diff --git a/file.pl b/file.pl
index eb16920..1eaa01f 100644
--- a/file.pl
+++ b/file.pl
@@ -18,7 +18,10 @@ $type =~ s/\)/\\\)/g;
$type =~ s/\[/\\\[/g;
$type =~ s/\]/\\\]/g;
$type =~ s/\^/\\\^/g;
+$type =~ s/\#/\\\#/g;
+$type =~ s/\*/\\\*/g;
my $type_out = $ARGV[0];
+my $type_esc = uri_escape($ARGV[0]);
my $file = $ARGV[1];
my $skipFile = $ARGV[2];
@@ -54,7 +57,7 @@ if ($found == 0) {
#my $scrapp = scraper {
# process '//table/tr/td', 'chars[]' => 'TEXT';
#};
- my $wikiurl = "http://www.file-extensions.org/search/?searchstring=$ARGV[0]";
+ my $wikiurl = "http://www.file-extensions.org/search/?searchstring=$type_esc";
my $scrapp = scraper {
process '//table/tr/td', 'chars[]' => 'TEXT';
process '//div//p', 'results[]' => 'TEXT';