You are here: Foswiki>Tasks Web>Item1342 (15 Mar 2011, GeorgeClark)Edit Attach

Item1342: html cleanup in left bar

pencil
Priority: Normal
Current State: Confirmed
Released In: n/a
Target Release: n/a
Applies To: Engine
Component: FoswikiTemplates
Branches:
Reported By: SvenDowideit
Waiting For: ArthurClemens
Last Change By: GeorgeClark
[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

ItemTemplate edit

Summary html cleanup in left bar
ReportedBy SvenDowideit
Codebase
SVN Range Foswiki-1.0.0, Thu, 08 Jan 2009, build 1878
AppliesTo Engine
Component FoswikiTemplates
Priority Normal
CurrentState Confirmed
WaitingFor ArthurClemens
Checkins
TargetRelease n/a
ReleasedIn n/a
Topic revision: r4 - 15 Mar 2011, GeorgeClark
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy