[interchange] Added path_only attribute to the [area] tag
Jon Jensen <[email protected]>
| Newsgroups | gmane.comp.web.interchange.cvs |
|---|---|
| Message-ID | <[email protected]> |
commit 7aa66b0038137e9f578d5077a1e0ffea504321fb Author: Jon Jensen <[email protected]> Date: Wed Apr 7 14:39:15 2010 -0600 Added path_only attribute to the [area] tag This returns the URL without the leading protocol. Written by David Christensen <[email protected]> on 2008-12-30. lib/Vend/Util.pm | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) --- diff --git a/lib/Vend/Util.pm b/lib/Vend/Util.pm index 646a119..ecbafba 100644 --- a/lib/Vend/Util.pm +++ b/lib/Vend/Util.pm @@ -1316,6 +1316,11 @@ sub vendUrl { $opt->{anchor} =~ s/^#//; $r .= '#' . $opt->{anchor}; } + + # return full-path portion of the URL + if ($opt->{path_only}) { + $r =~ s!^https?://[^/]*!!i; + } return $r; }