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
Comment #1
deviantintegral commentedThe 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
Comment #2
pieterbezuijen commentedThe 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.
Comment #3
deviantintegral commentedHave you tried placing the line break converter to be after the table of contents filter? What is the order of your filters right now?
Comment #4
AlexisWilke commentedThe 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
Comment #5
AlexisWilke commentedThis 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