Enabled the ability to use slashes in page urls to emulate directory hierarchies.

This commit is contained in:
JT Smith 2002-08-17 21:14:42 +00:00
parent 8b1a43f500
commit 6426950192
2 changed files with 8 additions and 6 deletions

View file

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

View file

@ -50,11 +50,12 @@ sub gateway {
sub makeCompliant {
my ($value);
$value = $_[0];
$value =~ s/\s+$//g; #removes trailing whitespace
$value =~ s/^\s+//g; #removes leading whitespace
$value =~ s/ /_/g; #replaces whitespace with underscores
$value =~ s/\.$//g; #removes trailing period
$value =~ s/[^A-Za-z0-9\-\.\_]//g; #removes all funky characters
$value =~ s/\s+$//; #removes trailing whitespace
$value =~ s/^\s+//; #removes leading whitespace
$value =~ s/^\\//; #removes leading slash
$value =~ s/ /_/g; #replaces whitespace with underscores
$value =~ s/\.$//; #removes trailing period
$value =~ s/[^A-Za-z0-9\-\.\_\\]//g; #removes all funky characters
return $value;
}