Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Don't strip '" and space if $parameter in fixurl()

  • Loading branch information...
commit 450bc2e3df079fec386c64d7d368e09a6c5cedda 1 parent a8dd60d
@pudge pudge authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 Slash.pm
View
6 Slash.pm
@@ -1358,18 +1358,18 @@ sub approveTag {
########################################################
sub fixurl {
my($url, $parameter) = @_;
- $url =~ s/[" ]//g;
- $url =~ s/^'(.+?)'$/$1/g;
# encode all non-safe, non-reserved characters
# different char set if destined to be a query string parameter
if ($parameter) {
$url =~ s/([^\w.+!*'(),;:@\$\/%-])/sprintf "%%%02X", ord $1/ge;
} else {
+ $url =~ s/[" ]//g;
+ $url =~ s/^'(.+?)'$/$1/g;
$url =~ s/([^\w.+!*'(),;:@\$\/%-?=&#])/sprintf "%%%02X", ord $1/ge;
+ $url = fixHref($url) || $url;
}
- $url = fixHref($url) || $url;
my $decoded_url = decode_entities($url);
return $decoded_url =~ s|^\s*\w+script\b.*$||i ? undef : $url;
}
Please sign in to comment.
Something went wrong with that request. Please try again.