Edgewall Software

Ticket #2657 (closed defect: fixed)

Opened 2 years ago

Last modified 22 months ago

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

Reported by: jhuntwork@… Owned by: cboos
Priority: low Milestone: 0.10
Component: wiki system Version: 0.9.3
Severity: normal Keywords:
Cc:

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

div_macro_fix.diff (1.5 kB) - added by cboos 2 years ago.
Here's a possible solution, patch on top of trunk@2975

Change History

Changed 2 years ago by cmlenz

  • summary changed from Trac fails XHTML validation when using a TOC macro to Wiki formatter should not put wiki macro output inside a <p></p> element

Changing summary to be more specific

Changed 2 years ago by cmlenz

  • priority changed from normal to low
  • component changed from general to wiki
  • milestone set to 0.10

Changed 2 years ago by cboos

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

Changed 2 years ago by cboos

  • owner changed from jonas to cboos
  • status changed from new to assigned

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

Changed 2 years ago by cboos

  • status changed from assigned to closed
  • resolution set to fixed

The above fix was applied as r3008.

Add/Change #2657 (Wiki formatter should not put wiki macro output inside a <p></p> element)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.