Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-29823

QXmlWriter does not escape VT, which then stuffs QXmlReader - even in a CDATA!

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 4.8.4
    • None
    • Windows, VisualStudio

    Description

      So there's a bug in something, either the writer or the reader, or both.
      The QXmlWriter does not escape VT (vertical tab)http://www.fileformat.info/info/unicode/char/000b/index.htm which a user has managed to put into QPlainTextEdit which I then save out to XML.

      The QXmlReader then fails to read the element. I encoded it in a CDATA section and it STILL fails to parse it.

      I have attached the simplest XML file ever which you'll see fails to fully parse. I have worked around this by simply sanitising my output by doing .replace(QChar(0x000B), ' '); (since we don't particularly care for it) but it seems like borking out when it's in the CDATA section is bad - it's not supposed to be parsed by the parser.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              thiago Thiago Macieira
              gemmell Simon Gemmell
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes