Documented a regexp in Session/Url.pm

Add passthruUrls to the list of URLs that are changed by fixUrl.
Wrote a bunch of POD for fixUrl
Changed the regular expressions related to badUrl so they don't need to copy the data.  This
will speed them up.
Fixed a bug where trailing slashes would defeat the badUrl check.
Re-indented according to WGBP.
Added tests to cover all of the changes.
This commit is contained in:
Colin Kuskie 2007-12-11 22:51:31 +00:00
parent c44a5a1bb6
commit afcc90b130
3 changed files with 71 additions and 19 deletions

View file

@ -140,7 +140,7 @@ sub extras {
my $self = shift;
my $path = shift;
my $url = $self->session->config->get("extrasURL").'/'.$path;
$url =~ s$(?<!^http:)/{2,}$/$g;
$url =~ s$(?<!^http:)/{2,}$/$g; ##Remove //, unless it's part of http://
return $url;
}