Skip to content

Commit

Permalink
Item13301: encode ; in urls
Browse files Browse the repository at this point in the history
  • Loading branch information
cdot committed Mar 9, 2015
1 parent 0ffe965 commit 878af6d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/lib/Foswiki.pm
Expand Up @@ -2885,6 +2885,8 @@ RFC 1738, Dec. '94:
Reserved characters are $&+,/:;=?@ - these are _also_ encoded by
this method.
Because of issues with browsers, ' is also encoded.
This URL-encoding handles all character encodings including ISO-8859-*,
KOI8-R, EUC-* and UTF-8.
Expand All @@ -2897,7 +2899,7 @@ URL, but mainframe web servers seem to translate this outbound before it hits br
sub urlEncode {
my $text = shift;

$text =~ s/([^0-9a-zA-Z-_.:~!*'\/])/'%'.sprintf('%02x',ord($1))/ge;
$text =~ s/([^0-9a-zA-Z-_.:~!*\/])/'%'.sprintf('%02x',ord($1))/ge;

return $text;
}
Expand Down

0 comments on commit 878af6d

Please sign in to comment.