Maven Doxia

Not valid xhtml document if comment with minus character

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.1
  • Fix Version/s: 1.1.1
  • Component/s: Module - Xhtml
  • Labels:
    None
  • Number of attachments :
    0

Description

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 

Activity

Hide
Vincent Siveton added a comment -

fixed in r779250

Show
Vincent Siveton added a comment - fixed in r779250
Hide
Lukas Theussl added a comment -

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?

Show
Lukas Theussl added a comment - 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?
Hide
Benjamin Bentmann added a comment -

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.

Show
Benjamin Bentmann added a comment -
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.
Hide
Lukas Theussl added a comment -

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

Show
Lukas Theussl added a comment - Exactly, and this only covers the two cases I mentioned: double-hyphens and trailing hyphens, am I right?
Hide
Vincent Siveton added a comment -

more generic resolution in r779565

Show
Vincent Siveton added a comment - more generic resolution in r779565

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: