00502: Incorrectly nested wiki-markup breaks XHTML compatibility

Summary: Incorrectly nested wiki-markup breaks XHTML compatibility
Created: 2005-08-31 13:40
Status: Closed - design decision
Category: Bug
From: floozy
Assigned:
Priority: 1
Version: pmwiki-2.0.beta55

Description: Incorrectly nested wiki-markup is converted to invalid XHTML code. The sample below has been tested in the WikiSandbox of http://www.pmwiki.org and validated using the W3 HTML Validator http://validator.w3.org.

Wiki input:

Incorrectly ''nested '^tags ''break ^'XHTML compatibility...

Invalid XHTML output:

Incorrectly <em>nested <sup>tags </em>break </sup>XHTML compatibility...


This is actually a known problem, and one that I long ago decided to just live with. (Interestingly, this appears to be the first report in PITS.)

It turns out that getting PmWiki to generate perfectly correct nested XHTML from improperly nested markups adds a whole lot of complexity to the system, and my feeling is that this case is not important enough to justify the extra work and complexity required to get there. (Only inline markups have this problem -- block markups do always correctly nest.)

So, for better or worse, the "solution" at the moment is just to tell authors to properly nest inline markups, or to simply edit and correct the nesting when someone notices a problem.

--Pm