Edgewall Software
Modify

Opened 19 years ago

Closed 19 years ago

Last modified 18 years ago

#2657 closed defect (fixed)

Wiki formatter should not put wiki macro output inside a <p></p> element

Reported by: jhuntwork@… 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)

div_macro_fix.diff (1.5 KB ) - added by Christian Boos 19 years ago.
Here's a possible solution, patch on top of trunk@2975

Download all attachments as: .zip

Change History (5)

comment:1 by Christopher Lenz, 19 years ago

Summary: Trac fails XHTML validation when using a TOC macroWiki formatter should not put wiki macro output inside a <p></p> element

Changing summary to be more specific

comment:2 by Christopher Lenz, 19 years ago

Component: generalwiki
Milestone: 0.10
Priority: normallow

by Christian Boos, 19 years ago

Attachment: div_macro_fix.diff added

Here's a possible solution, patch on top of trunk@2975

comment:3 by Christian Boos, 19 years ago

Owner: changed from Jonas Borgström to Christian Boos
Status: newassigned

I've written a possible fix (attachment:div_macro_fix.diff)

comment:4 by Christian Boos, 19 years ago

Resolution: fixed
Status: assignedclosed

The above fix was applied as r3008.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christian Boos to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.