Item1342: html cleanup in left bar
Priority: Normal
Current State: Confirmed
Released In: n/a
Target Release: n/a
[14:14] <tauu> for every subweb I get the "warning: trimming empty <span>" in "WebLeftBarWebsList" because the identation is generated with <span class="foswikiWebIndent"></span>sub_web_name</a>
[14:15] <SvenDowideit_> tauu, ew!
[14:15] <tauu> better would be: <span class="foswikiWebIndent">sub_web_name</span>
current code that generates the span tags (Foswiki.pm Line 3801 following)
my $indent = CGI::span( { class => 'foswikiWebIndent' }, '' );
foreach my $item (@list) {
my $line = $format;
$line =~ s/\$web\b/$web/g;
$line =~ s/\$name\b/$item/g;
$line =~ s/\$qname/"$item"/g;
my $indenteditem = $item;
$indenteditem =~ s#/$##g;
$indenteditem =~ s#\w+/#$indent#g;
$line =~ s/\$indentedname/$indenteditem/g;
my $mark = ( $selection =~ / \Q$item\E / ) ? $marker : '';
$line =~ s/\$marker/$mark/g;
push( @items, $line );
}
Confirmed. Since this code was done, the span has been moved to a template.
--
CrawfordCurrie - 25 Jun 2010
W3C Validator claims that empty span tags
<span class='foswikiWebIndent'></span>
are valid XHTML 1.0 Strict.
Arthur, can you confirm, is there an issue here? One suggestion I've found to minimize warnings from overzealous validation tests is to insert an empty comment into the empty span.
<span class='foswikiWebIndent'><!-- --></span>
but this is to keep validation happy and is not needed for strict compliance.
--
GeorgeClark - 15 Mar 2011