version 1.125, 2004/10/20 10:51:50
|
version 1.126, 2004/10/20 10:54:08
|
Line 74 my @Omit = ();
|
Line 74 my @Omit = ();
|
|
|
|
|
|
|
# |
|
# Escapes strings that may have embedded 's that will be put into |
|
# javascript strings as 'strings'. |
|
# The assumptions are: |
|
# There has been no effort to escape ' with \' |
|
# Any \'s in the string are intended to be there as part of the URL |
|
# and must also be escaped. |
|
# Parameters: |
|
# input - The string to escape. |
|
# Returns: |
|
# The escaped string (' replaced by \' and \ replaced by \\). |
|
# |
|
sub javascript_escape { |
|
my ($input) = @_; |
|
|
|
# I imagine a regexp wizard could combine the two expressions below. |
|
# If you do you might want to comment the result. |
|
|
|
$input =~ s/\\/\\\\/g; # Escape the /'s..(must be first)> |
|
$input =~ s/\'/\\\'/g; # Esacpe the 's.... |
|
|
|
return $input; |
|
} |
|
|
|
|
|
|
|
# ----------------------------- Handling routine called via Apache and mod_perl |
# ----------------------------- Handling routine called via Apache and mod_perl |
sub handler { |
sub handler { |
Line 1257 sub cleanup {
|
Line 1232 sub cleanup {
|
} |
} |
} |
} |
|
|
|
|
|
# |
|
# Escapes strings that may have embedded 's that will be put into |
|
# javascript strings as 'strings'. |
|
# The assumptions are: |
|
# There has been no effort to escape ' with \' |
|
# Any \'s in the string are intended to be there as part of the URL |
|
# and must also be escaped. |
|
# Parameters: |
|
# input - The string to escape. |
|
# Returns: |
|
# The escaped string (' replaced by \' and \ replaced by \\). |
|
# |
|
sub javascript_escape { |
|
my ($input) = @_; |
|
|
|
# I imagine a regexp wizard could combine the two expressions below. |
|
# If you do you might want to comment the result. |
|
|
|
$input =~ s/\\/\\\\/g; # Escape the /'s..(must be first)> |
|
$input =~ s/\'/\\\'/g; # Esacpe the 's.... |
|
|
|
return $input; |
|
} |
|
|
|
|
|
|
=head1 NAME |
=head1 NAME |
|
|
Apache::lonindexer - mod_perl module for cross server filesystem browsing |
Apache::lonindexer - mod_perl module for cross server filesystem browsing |