Skip to content

Commit

Permalink
Don't strip '" and space if $parameter in fixurl()
Browse files Browse the repository at this point in the history
  • Loading branch information
pudge committed Jul 10, 2000
1 parent a8dd60d commit 450bc2e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Slash.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 450bc2e

Please sign in to comment.