Uploaded image for project: 'Maven Surefire'
  1. Maven Surefire
  2. SUREFIRE-456

Surefire doubly XML-escapes non-visible control characters

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 2.4.2
    • Fix Version/s: None
    • Component/s: xml generation
    • Labels:
      None

      Description

      It's illegal to include a non-visible control character in XML, even as a character entity. e.g. "�" is illegal in XML, even though it's semantically meaningful.

      http://www.w3.org/TR/1998/REC-xml-19980210#charsets

      Disturbingly, Java's XML serializer will cheerfully print out � despite the fact that it will refuse to parse that entity.

      As a workaround, for 2.4.2 we're deliberately doublly XML-escaping non-visible control characters, printing them as "�" instead of "�" like they're supposed to be. That's better than any alternative I can think of (e.g. throwing the characters away in test results, replacing them with a "?" character).

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              dfabulich Daniel Fabulich
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: