Uploaded image for project: 'Subversion'
  1. Subversion
  2. SVN-2866

"svn log --xml" can output invalid XML

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.4.x
    • 1.5.0
    • cmdline client

    Description

      SVN can output some invalid XML with the log command. It
      happens when e.g. a commit message contains control characters. Those
      control characters are valid UTF-8 but are not allowed by the XML 1.0 spec
      (XML 1.0 only allows control characters 0x9, 0xA and 0xD : see
      http://www.w3.org/TR/REC-xml/#charsets ).
      
      This is a concrete example from an existing repository:
      
      svn log --xml -r 1722 svn://exaile.org/usr/local/svn/exaile/trunk | xmllint -
      
      While keeping to XML 1.0, the only solution I can think of is to completely
      strip those control characters when an XML output is desired.
      Otherwise SVN could output XML 1.1, where apparently those control characters
      are allowed as part of character data.
      

      Original issue reported by pitrou

      Attachments

        Activity

          People

            Unassigned Unassigned
            subversion-importer Subversion Importer
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: