summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xmediawiki-uri-escape6
1 files changed, 1 insertions, 5 deletions
diff --git a/mediawiki-uri-escape b/mediawiki-uri-escape
index 3377744..196e1c6 100755
--- a/mediawiki-uri-escape
+++ b/mediawiki-uri-escape
@@ -7,17 +7,13 @@ use strict;
use Path::Tiny;
use Regexp::Common qw(net);
-use URI::Escape;
my $infile = shift;
my $outfile = shift || $infile;
$_ = path($infile)->slurp_utf8;
-my $uri_path = qr!https?://$RE{net}{domain}{-nospace}(?::\d+)?\K(/\S*?)!;
-my $uri_end = qr!(?=[.,;]?[\s<\"\|}\]])!;
-
-s|\b$uri_path$uri_end|uri_escape(uri_unescape($1), "^A-Za-z0-9/\.")|eg;
+s/=-/%3D%2D/g;
path($outfile)->spew_utf8($_);