Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

More fixurl() fixes

  • Loading branch information...
commit c7fcde9b502bd5820de48fa530109ba1ee44734a 1 parent 450bc2e
@pudge pudge authored
View
5 Slash.pm
@@ -1362,11 +1362,12 @@ sub fixurl {
# 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;
+ $url =~ s/([^\w.!*'(),;:@\$\/% -])/sprintf "%%%02X", ord $1/ge;
+ $url =~ s/ /+/g;
} else {
$url =~ s/[" ]//g;
$url =~ s/^'(.+?)'$/$1/g;
- $url =~ s/([^\w.+!*'(),;:@\$\/%-?=&#])/sprintf "%%%02X", ord $1/ge;
+ $url =~ s/([^\w.!*'(),;:@\$\/%?=&#+-])/sprintf "%%%02X", ord $1/ge;
$url = fixHref($url) || $url;
}
View
2  plugins/Submit/submit.pl
@@ -415,7 +415,7 @@ sub submissionEd {
my @strs = (substr($subj, 0, 35), substr($name, 0, 20), substr($email, 0, 20));
# Adds proper section for form editor.
my $sec = $section ne $I{defaultsection} ? "&section=$section" : "";
- my $stitle = '&title=' . fixurl($strs[0], 1);
+ my $stitle = '&title=' . fixurl($subj, 1);
printf(($admin ? <<ADMIN : <<USER), @strs);
</FONT><INPUT TYPE="CHECKBOX" NAME="del_$subid">
View
2  public_html/submit.pl
@@ -415,7 +415,7 @@ sub submissionEd {
my @strs = (substr($subj, 0, 35), substr($name, 0, 20), substr($email, 0, 20));
# Adds proper section for form editor.
my $sec = $section ne $I{defaultsection} ? "&section=$section" : "";
- my $stitle = '&title=' . fixurl($strs[0], 1);
+ my $stitle = '&title=' . fixurl($subj, 1);
printf(($admin ? <<ADMIN : <<USER), @strs);
</FONT><INPUT TYPE="CHECKBOX" NAME="del_$subid">
View
2  themes/slashcode/htdocs/submit.pl
@@ -415,7 +415,7 @@ sub submissionEd {
my @strs = (substr($subj, 0, 35), substr($name, 0, 20), substr($email, 0, 20));
# Adds proper section for form editor.
my $sec = $section ne $I{defaultsection} ? "&section=$section" : "";
- my $stitle = '&title=' . fixurl($strs[0], 1);
+ my $stitle = '&title=' . fixurl($subj, 1);
printf(($admin ? <<ADMIN : <<USER), @strs);
</FONT><INPUT TYPE="CHECKBOX" NAME="del_$subid">
Please sign in to comment.
Something went wrong with that request. Please try again.