javascript and iframe url's are now rewritten
This commit is contained in:
parent
c62489fe46
commit
4df1f25fea
2 changed files with 4 additions and 3 deletions
|
|
@ -164,6 +164,7 @@ sub www_view {
|
|||
}
|
||||
|
||||
$header = new HTTP::Headers;
|
||||
$header->referer($_[0]->get("proxiedURL")); # To get around referrer blocking
|
||||
|
||||
if($session{env}{REQUEST_METHOD}=~/GET/i
|
||||
|| $redirect != 0) { # request_method is also GET after a redirection. Just to make sure we're
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@ use WebGUI::URL;
|
|||
use vars qw(@ISA);
|
||||
@ISA = qw(HTML::Parser);
|
||||
|
||||
|
||||
|
||||
my %linkElements = # from HTML::Element.pm
|
||||
(
|
||||
|
|
@ -33,6 +32,8 @@ my %linkElements = # from HTML::Element.pm
|
|||
frame => 'src',
|
||||
applet => 'codebase',
|
||||
area => 'href',
|
||||
script => 'src',
|
||||
iframe => 'src',
|
||||
);
|
||||
|
||||
my %tag_attr;
|
||||
|
|
@ -91,7 +92,6 @@ sub end {
|
|||
$_[0]->output("</$_[1]>")
|
||||
}
|
||||
|
||||
|
||||
sub start {
|
||||
my $self = shift;
|
||||
my ($tag, $attr, $attrseq, $origtext) = @_;
|
||||
|
|
@ -114,7 +114,7 @@ sub start {
|
|||
$val = URI::URL::url($val)->abs($self->{Url},1); # make absolute
|
||||
}
|
||||
if ($val->scheme eq "http") {
|
||||
if (lc($tag) ne "img") { # no rewrite for images
|
||||
if (lc($tag) ne "img" && lc($tag) ne "script" && lc($tag) ne "iframe") { # no rewrite for some
|
||||
if (lc($tag) eq "form" && lc($_) eq "action") { # Found FORM ACTION
|
||||
$self->{FormActionIsDefined}=1;
|
||||
$self->{FormAction} = $val; # set FormAction to include hidden field later
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue