Uploaded image for project: 'Xerces-C++'
  1. Xerces-C++
  2. XERCESC-1854

Serialization does not detect invalid XML characters

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0.1
    • 3.2.0
    • DOM
    • None

    Description

      The attached test case serializes an invalid XML 1.0 document that contains a character with value 0x04. See http://www.w3.org/TR/REC-xml/#NT-Char for the list of valid characters in an XML 1.0 document.

      I've done some digging and it seems that XMLFormatter should check for this. In fast, there is already code for XML 1.1 that checks for these control characters since they need to be escaped in 1.1. It looks like we need to check for invalid characters when in the 1.0 mode. There is the XMLChar1_0::isXMLChar() function which can presumably be used.

      Attachments

        1. test.cxx
          1 kB
          Boris Kolpackov

        Activity

          People

            amassari Alberto Massari
            bsk Boris Kolpackov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: