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

Some special characters not escaped when written to XML file.

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Invalid
    • P2: Important
    • None
    • 5.9.8, 5.12.8, 5.14.2
    • XML: DOM

    Description

      User contacted Qt support about following:

      "

      XML has 5 special characters >, <, &, ' and ", and they should be escaped when written to XML file as >, <, &, ' and " correspondingly.

      However, when using QDomElement::setAttribute to write strings containing these special characters, > and ' are not escaped, though <, &, and " are escaped correctly.

      "

      Qt Support tested this and with QDomElement::setAttribute("attribute","> < & ' ") looks like 
      "> < & ' " in XML file.
       

      Attachments

        1. QDomSymbolTest.zip
          4 kB
          Tero Pelkonen
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            sonakur Sona Kurazyan
            tero.pelkonen Tero Pelkonen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes