diff --git a/lib/WebGUI/Wobject/HttpProxy/Parse.pm b/lib/WebGUI/Wobject/HttpProxy/Parse.pm index 61d2851d0..c73cca2a4 100644 --- a/lib/WebGUI/Wobject/HttpProxy/Parse.pm +++ b/lib/WebGUI/Wobject/HttpProxy/Parse.pm @@ -63,7 +63,7 @@ sub filter { my $self=shift; $self->parse($self->{Content}); # Make paths absolute and let them return to us $self->eof; - return "
Error: Can't proxy a HttpProxy object inside a HttpProxy object.
" if ($self->{recurseCheck}); + return "Error: HttpProxy can't recursively proxy its own content.
" if ($self->{recurseCheck}); return $self->{Filtered}; } @@ -97,11 +97,14 @@ sub end { sub start { my $self = shift; my ($tag, $attr, $attrseq, $origtext) = @_; + # Check on the div class and div id attributes to see if we're proxying ourself. + if($tag eq "div" && $attr->{'class'} eq 'wobjectHttpProxy' && $attr->{'id'} eq ('wobjectId'.$self->{wid})) { + $self->{recurseCheck} = 1; + } $self->output("<$tag"); for (keys %$attr) { $self->output(" $_=\""); my $val = $attr->{$_}; - $self->{recurseCheck} = 1 if($val =~ /proxiedUrl=/i); # We're proxying ourself. if ((lc($tag) eq "input" || lc($tag) eq "textarea" || lc($tag) eq "select") && (lc($_) eq "name" || lc($_) eq "submit")) { # Rewrite input type names $val = 'HttpProxy_' . $val;