Uploaded image for project: 'XML-RPC'
  1. XML-RPC
  2. XMLRPC-69

XmlWriter.isValidXMLChar(char) incorrectly determines ASCII space (0x20) character to be invalid XML

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0
    • 2.1
    • Releases
    • None
    • All

    Description

      The ASCII space character (0x20) should be valid XML (as I understand it). The isValidXMLChar() method returns false and hence a space character gets encoded as a character entity ( ). This bug was checked in with version 1.14 of XmlWriter.java and exists in the current release version.

      A possible patch would be as follows:

      @@ -463,7 +463,7 @@
      return true;

      default:

      • return ( (0x20 < c && c <= 0xd7ff) ||
        + return ( (0x20 <= c && c <= 0xd7ff) ||
        (0xe000 < c && c <= 0xfffd) ||
        (0x10000 < c && c <= 0x10ffff) );
        }

      thanks,

      • Claude

      Attachments

        Activity

          People

            jochen@apache.org Jochen Wiedmann
            zervouli Claude Zervas
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: