I believe there is some minor flaw in the HTML generated by this module. All the pages on my site pass the HTML validation tests, except the ones containing a TOC, where the validation service says:

<p\><div class="toc">
          ^
Error: element div not allowed here; possible cause is an inline element containing a block-level element

For instance:
http://htmlhelp.com/tools/validator/
http://validator.w3.org/

Conformance might be quite an issue for some people. Is this something that can be easily addressed?
Thank you, and thanks for this great module.

Comments

deviantintegral’s picture

Priority: Normal » Minor
Status: Active » Closed (won't fix)

The filter does not add paragraph tags. Either another filter is adding them, or you've put them in manually. The div is needed for styling and the show/hide javascript, so it can't be removed or replaced.

--Andrew

pieterbezuijen’s picture

The standard 'Line break converter' puts the

around the module code, which causes the fact that the html doesn't pass the validation test.

Might there be a way to find surrounding

-tags? This would be helpfull for a lot of people I guess.

deviantintegral’s picture

Status: Closed (won't fix) » Postponed (maintainer needs more info)

Have you tried placing the line break converter to be after the table of contents filter? What is the order of your filters right now?

AlexisWilke’s picture

Version: 6.x-2.x-dev » 6.x-3.x-dev
Assigned: Unassigned » AlexisWilke
Status: Postponed (maintainer needs more info) » Active

The problem can happen if you write the comment within a paragraph which is the case whenever you write the [toc ...] in a WYSIWYG editor. I will have to look into that!

Thank you.
Alexis Wilke

AlexisWilke’s picture

Status: Active » Fixed

This is fixed. I simply added support to check for the <p> tag before and after the tag. Works great for me, although I have a similar problem with another module.

Thank you.
Alexis Wilke

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.