• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item4282: TwistyPlugin generates invalid html

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Extension TwistyPlugin Normal Closed   n/a  

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

It still generates divs at places in the html code where only spans are allowed, e.g. inside a h2. That's invalid html not displayed correctly in some browers.

There's an explicit mode parameter that configures which kind of elements are to be generated, spans or divs. Nevertheless the plugin generates html wrapper code using divs. This should be spans instead as they are allowed more widely than divs.

Example:

%TWISTY{prefix="<h2>" suffix="</h2>" mode="div"}%
   * some
   * list
%ENDTWISTY%

This will generate something like this

<h2>...<div>  <a> hide/show </a> </div> </h2>
<div>
  <ul>
    <li>some</li>
    <li>list</li>
  </ul>
</div>

But making the button depend on the mode parameter would also be wrong:

%TWISTY{prefix="<h2>" suffix="</h2>" mode="span"}%
   * some
   * list
%ENDTWISTY%

<h2>...<span>  <a> hide/show </a></span>  </h2>
<span>
  <ul>
    <li>some</li>
    <li>list</li>
  </ul>
</span>
... because an UL is forbidden inside a SPAN in the toggled area.

It seems as though the functions _wrapIn... should be sensitive to the mode / buttonmode settings...

-- TWiki:Main/MichaelDaum - 22 Jun 2007

The solution is to put the prefix and suffix inside the wrapper div. That way the header won't appear when no javascript is available, and the page will validate.

-- TWiki:Main.ArthurClemens - 11 Jul 2007

ItemTemplate
Summary TwistyPlugin generates invalid html
ReportedBy TWiki:Main.MichaelDaum
Codebase

SVN Range TWiki-4.1.2, Thu, 21 Jun 2007, build 14235
AppliesTo Extension
Component TwistyPlugin
Priority Normal
CurrentState Closed
WaitingFor

Checkins TWikirev:14386
TargetRelease n/a
ReleasedIn

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2007-07-11 - TWikiUserMapping_ArthurClemens
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback