summaryrefslogtreecommitdiff
path: root/mediawiki-uri-escape
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2014-12-30 15:04:13 +0100
committerJonas Smedegaard <dr@jones.dk>2014-12-30 15:04:13 +0100
commit5c2d30c6382dec9b2746fb913b169038bf11d402 (patch)
tree911e23ec474540e3ba76c7da258e7d543591679b /mediawiki-uri-escape
parentecfc2b9155270847499a6e3e82f95e3bde51ec91 (diff)
Fix add ] as URL stop character.
Diffstat (limited to 'mediawiki-uri-escape')
-rwxr-xr-xmediawiki-uri-escape2
1 files changed, 1 insertions, 1 deletions
diff --git a/mediawiki-uri-escape b/mediawiki-uri-escape
index 40dd10c..3377744 100755
--- a/mediawiki-uri-escape
+++ b/mediawiki-uri-escape
@@ -15,7 +15,7 @@ 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<\"\|}])!;
+my $uri_end = qr!(?=[.,;]?[\s<\"\|}\]])!;
s|\b$uri_path$uri_end|uri_escape(uri_unescape($1), "^A-Za-z0-9/\.")|eg;