Issue Details (XML | Word | Printable)

Key: DOXIA-325
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Vincent Siveton
Reporter: Vincent Siveton
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Maven Doxia

Not valid xhtml document if comment with minus character

Created: 27/May/09 12:22 PM   Updated: 28/May/09 06:48 AM   Resolved: 28/May/09 06:48 AM
Return to search
Component/s: Module - Xhtml
Affects Version/s: 1.1
Fix Version/s: 1.1.1

Time Tracking:
Not Specified


 Description  « Hide

if comment has minus character, the rendering is not valid, ie

fo ---- fo 

should be the following to be a valid xhtml rendering

fo - - - - fo 


Vincent Siveton added a comment - 27/May/09 12:29 PM

fixed in r779250


Lukas Theussl added a comment - 28/May/09 02:26 AM

This is a weird issue and I'm not quite happy with the current solution. Consider for instance the following comment:

<!-- workaround for DOXIA-227: (fixed in Doxia 1.1, was 1.0-beta-1) -->

This gets re-written to

<!-- workaround for DOXIA -227: (fixed in Doxia 1.1, was 1.0 -beta -1) -->

However, the original comment is perfectly valid according to http://validator.w3.org/, so I see no reason to re-write it.

IIUC only double-hyphens and trailing hyphens are illegal inside comments but I couldn't find any conclusive reference, so not really sure. Given that uncertainty, I think Doxia shouldn't change any user input at will. I would prefer either to only change double hyphens (to make w3c happy), or to not re-write comments at all (and maybe issue a warning). After all it's the user's responsibility to provide valid input. WDYT?


Benjamin Bentmann added a comment - 28/May/09 02:47 AM

IIUC only double-hyphens and trailing hyphens are illegal inside comments but I couldn't find any conclusive reference

The XML Spec should be the normative reference.


Lukas Theussl added a comment - 28/May/09 04:29 AM

Exactly, and this only covers the two cases I mentioned: double-hyphens and trailing hyphens, am I right?


Vincent Siveton added a comment - 28/May/09 06:48 AM

more generic resolution in r779565