! improved parsing of # anchors
This commit is contained in:
parent
3e22161d8b
commit
c18b7da8cc
1 changed files with 5 additions and 0 deletions
|
|
@ -122,6 +122,11 @@ sub start {
|
||||||
if ($val =~ /^\?/) { # link that starts with ? i.e. <a href="?var=hello">
|
if ($val =~ /^\?/) { # link that starts with ? i.e. <a href="?var=hello">
|
||||||
my @urlBase = split(/\?/, $self->{Url});
|
my @urlBase = split(/\?/, $self->{Url});
|
||||||
$val = URI::URL::url($urlBase[0] . $val);
|
$val = URI::URL::url($urlBase[0] . $val);
|
||||||
|
|
||||||
|
# catch internal # anchors
|
||||||
|
} elsif ($val =~ /^#/){
|
||||||
|
$val = URI::URL::url($val);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$val = URI::URL::url($val)->abs($self->{Url},1); # make absolute
|
$val = URI::URL::url($val)->abs($self->{Url},1); # make absolute
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue