fixed a potential problem where adding a slash at the end of a url would cause the user to only see the not found page.

This commit is contained in:
JT Smith 2003-05-17 00:31:46 +00:00
parent f78aa7fa43
commit 22901a0318
2 changed files with 3 additions and 2 deletions

View file

@ -75,7 +75,7 @@ sub _setupPageInfo {
($pageId) = $_[0];
if ($pageId eq "") {
$pageName = lc($ENV{PATH_INFO});
#$pageName =~ s/\///g;
$pageName =~ s/\/$//;
$pageName =~ s/\///;
$pageName =~ s/\'//;
$pageName =~ s/\"//;

View file

@ -234,7 +234,7 @@ sub unescape {
=head2 urlize ( string )
Same as makeCompliant except that it also lower-cases the string. This is mainly meant for WebGUI page URLs.
Returns a url that is safe for WebGUI pages.
=over
@ -250,6 +250,7 @@ sub urlize {
my ($value);
$value = lc($_[0]); #lower cases whole string
$value = makeCompliant($value);
$value =~ s/\/$//;
return $value;
}