Skip to content
Browse files

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

  • Loading branch information...
1 parent a8dd60d commit 450bc2e3df079fec386c64d7d368e09a6c5cedda @pudge pudge committed Jul 10, 2000
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;
}

0 comments on commit 450bc2e

Please sign in to comment.
Something went wrong with that request. Please try again.