Hello,

My HTML validator keeps catching this error, and while it seems to have no critical affect on the usability of the module, my boss likes to see HTML error-free sites. (Meaning I need to somehow fix it). Anyhow, so when TOC creates a nested list under the main headers, it misses the closing </li> tag after the closing </ul> tag.

Example: (copied and pasted from my source code)

<ul>
	<li class="toc-level-1"><a href="#Overview">Overview</a></li>
	<li class="toc-level-1"><a href="#How_it_Works">How it Works</a></li>
	<li class="toc-level-1"><a href="#Demo">Demo</a></li>
	<li class="toc-level-1"><a href="#Instructions">Instructions</a>
<ul>
	<li class="toc-level-2"><a href="#Configuration_Variables">Configuration Variables</a></li>

</ul> //needs to have a closing </li> tag here
	<li class="toc-level-1"><a href="#Suggested_File_Names">Suggested File Names</a></li>
	<li class="toc-level-1"><a href="#File_Permissions">File Permissions</a></li>
	<li class="toc-level-1"><a href="#Valid_HTML">Valid HTML</a></li>
	<li class="toc-level-1"><a href="#Robot_Exclusion">Robot Exclusion</a></li>
	<li class="toc-level-1"><a href="#Cascading_Style_Sheets_CSS">Cascading Style Sheets (CSS)</a></li>
	<li class="toc-level-1"><a href="#Adding_RSS_Feeds">Adding RSS Feeds</a></li>

	<li class="toc-level-1"><a href="#Related_Links">Related Links</a>
<ul>
	<li class="toc-level-2"><a href="#Helpful_HTML_links">Helpful HTML links</a></li>
	<li class="toc-level-2"><a href="#Helpful_Stylesheet_links">Helpful Stylesheet links</a></li>
</ul>
</li> //but it does have one here?
</ul>

I'm not sure if this is an error in the module, or maybe is it something funny with my headers? Either way, if anyone has a solution it would be greatly appreciated.
Thanks,
Emily

Comments

AlexisWilke’s picture

Assigned: Unassigned » AlexisWilke

I checked in a fix. Please, check with the new 6.x-dev (available within next 12h.)

Thank you.
Alexis

P.S. That first fix is not correct. It could be because the filter caches the content, I did not see the right output... Checking the code some more.

AlexisWilke’s picture

Okay, I now have the correct fix. I understand why I did not see the discrepancy, my browser fixes the code and when I look at the source from the browser, it looks correct. Note also that not closing the <li> tag is legal HTML, but illegal XHTML. 8-)

A new version should be available within the next 12h.

Thank you.
Alexis

AlexisWilke’s picture

Status: Active » Fixed

Meant to mark this fixed! 8-)

Status: Fixed » Closed (fixed)

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