Permalink
Browse files

More fixurl() fixes

  • Loading branch information...
1 parent 450bc2e commit c7fcde9b502bd5820de48fa530109ba1ee44734a @pudge pudge committed Jul 10, 2000
Showing with 6 additions and 5 deletions.
  1. +3 −2 Slash.pm
  2. +1 −1 plugins/Submit/submit.pl
  3. +1 −1 public_html/submit.pl
  4. +1 −1 themes/slashcode/htdocs/submit.pl
View
@@ -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
@@ -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
@@ -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">
@@ -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">

0 comments on commit c7fcde9

Please sign in to comment.