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

qmldom generates invalid XML if a string literal has escaped quotes

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • 6.11
    • 6.5
    • QML: Tooling
    • None
    • Tested on Arch Linux.
    • All

    Description

      If a string literal has escaped quotes in it, `qmldom --dump-ast` generates invalid XML.

      To reproduce, run `qmldom --dump-ast` on the following:

       

       

      import QtQuick 6.3
      Item {
          id: item
          property string name: "my \" name"
      }
       

       

       

      The result will have in its output:

       

       

      <StringLiteral value="my \" name" literalToken="off:65 len:12 l:4 c:27 "> 

      This will not be parseable as XML because this kind of escaping is illegal in XML.

      Attachments

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

        Activity

          People

            qtqmlteam Qt Qml Team User
            narcoticv Sander Vocke
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes