From ec2e7832f935b0ef7357ad94391ca42a95dc1291 Mon Sep 17 00:00:00 2001 From: Yung Han Khoe Date: Fri, 26 Jan 2007 16:31:25 +0000 Subject: [PATCH] WebGUI::HTML::makeAbsolute didn't handle closing slashes right. --- lib/WebGUI/HTML.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/WebGUI/HTML.pm b/lib/WebGUI/HTML.pm index 046cacb59..1edfc87f3 100644 --- a/lib/WebGUI/HTML.pm +++ b/lib/WebGUI/HTML.pm @@ -317,9 +317,11 @@ sub makeAbsolute { $absolute .= "<".$tagname; + my $foundClosingSlash; + foreach (keys %$attr) { if($_ eq '/') { - $absolute .= '/'; + $foundClosingSlash = '1'; next; } if ($tag_attr{"$tagname $_"}) { # make this absolute @@ -327,7 +329,7 @@ sub makeAbsolute { } $absolute .= qq' $_="$attr->{$_}"'; } - + $absolute .= '/' if ($foundClosingSlash); $absolute .= '>'; }; HTML::Parser->new(