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

JSON.stringify encodes quote marks as html entities

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.11.0
    • 5.10.0
    • WebEngine
    • None
    • b0af137a8c58af2538e500808ae1da6133a7d284

    Description

       
      I use QWebEngineView to load a simple webpage:

      view = new QWebEngineView(this);
      view->load(QUrl("file:///index1.html"));

      The web page (index1.html)is:
      <!doctype html>
      <html>
      <meta charset="utf-8">
      <head>
      </head>
      <body>

      <script>
      var par={var1:"123","var2":456};
      alert(JSON.stringify(par));
      </script>
      </body>
      </html>

      The alert window is:

      Note that all the quote marks in the object are encoded as html entities, which is not correct.

      Attachments

        For Gerrit Dashboard: QTBUG-66104
        # Subject Branch Project Status CR V

        Activity

          People

            viengelm Viktor Engelmann
            yetanotherqtfan Bill Smith
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes