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

QJson accepts invalid escape sequences in strings when parsing JSON files

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Not Evaluated
    • None
    • 5.13.1
    • Core: Other
    • None

    Description

      QJson accepts invalid backslash escapes in strings when parsing Json.

      The attached qmake project demonstrates the problem: It passes a string containing a "\." and QJsonDocument::fromJson(...) accepts that, returning a string containing a fixed string without the "stray" backslash instead.

      ECMA says that a conforming json processor should not do this. The Python Json parser correctly rejects files like these.

      Attachments

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

        Activity

          People

            laknoll Lars Knoll
            hunger Tobias Hunger
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes