[Jifty-commit] r2340 - Template-Declare/lib/Template/Declare
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Wed Dec 6 11:17:54 EST 2006
Author: audreyt
Date: Wed Dec 6 11:17:51 2006
New Revision: 2340
Modified:
Template-Declare/lib/Template/Declare/Tags.pm
Log:
* Template::Declare - Revert obra++'s treatment:
# default to <tag/> rather than <tag></tag> if there's no content
and added this comment:
# We should, in theory, default to <tag /> rather than <tag></tag> if there's no content,
# but until all we output is strict XHTML, "<iframe src='...' />" and "<a name='...' />"
# are rendered incorrectly by gecko -- they require the use of an explicit closing tag
# So intead of the correct treatment:
#
# $BUFFER .= $buf." />";
#
# we supply a closing tag for now:
#
$BUFFER .= $buf."></$tag>";
Modified: Template-Declare/lib/Template/Declare/Tags.pm
==============================================================================
--- Template-Declare/lib/Template/Declare/Tags.pm (original)
+++ Template-Declare/lib/Template/Declare/Tags.pm Wed Dec 6 11:17:51 2006
@@ -172,14 +172,22 @@
}
- # default to <tag/> rather than <tag></tag> if there's no content
if ($had_content) {
$BUFFER .= $buf;
$BUFFER .= "\n" . ( " " x $DEPTH ) if ( $buf =~ /\n/ );
$BUFFER .= "</$tag>";
}
else {
- $BUFFER .= $buf." />";
+ # We should, in theory, default to <tag /> rather than <tag></tag> if there's no content,
+ # but until all we output is strict XHTML, "<iframe src='...' />" and "<a name='...' />"
+ # are rendered incorrectly by gecko -- they require the use of an explicit closing tag
+ # So intead of the correct treatment:
+ #
+ # $BUFFER .= $buf." />";
+ #
+ # we supply a closing tag for now:
+ #
+ $BUFFER .= $buf."></$tag>";
}
return '';
}
More information about the Jifty-commit
mailing list