#2657 closed defect (fixed)
Wiki formatter should not put wiki macro output inside a <p></p> element
Reported by: | Owned by: | Christian Boos | |
---|---|---|---|
Priority: | low | Milestone: | 0.10 |
Component: | wiki system | Version: | 0.9.3 |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
Wiki pages using a Table of Contents macro generate XHTML that is invalid. The problem lies in the fact that the wiki sticks a <div> tag inside a <p> tag.
See here: http://validator.w3.org/check?verbose=1&uri=http%3A//wiki.linuxfromscratch.org/lfs/
You can see this in the default TracGuide, too: http://validator.w3.org/check?verbose=1&uri=http%3A//wiki.linuxfromscratch.org/lfs/wiki/TracGuide
And here's a clip of the generated code:
<div class="wikipage"> <div id="searchable"><h1 id="WhatisLinuxFromScratch">What is Linux From Scratch?</h1> <p> <div class="wiki-toc"><h4>Table of Contents</h4><ul><li class="active"><a href="/lfs/wiki/WikiStart">LFS Home</a></li><li><a href="/lfs/wiki/news">News</a></li><li><a href="/lfs/wiki/download">Download</a></li><li><a href="/lfs/wiki/read">Read Online</a></li></ul></div> </p>
Attachments (1)
Change History (5)
comment:1 by , 19 years ago
Summary: | Trac fails XHTML validation when using a TOC macro → Wiki formatter should not put wiki macro output inside a <p></p> element |
---|
comment:2 by , 19 years ago
Component: | general → wiki |
---|---|
Milestone: | → 0.10 |
Priority: | normal → low |
by , 19 years ago
Attachment: | div_macro_fix.diff added |
---|
Here's a possible solution, patch on top of trunk@2975
comment:3 by , 19 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
I've written a possible fix (attachment:div_macro_fix.diff)
comment:4 by , 19 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
The above fix was applied as r3008.
Changing summary to be more specific