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

Javascript URLSearchParams does not encode query parameters

    XMLWordPrintable

Details

    • d2c8fe712 (dev), 6cca731f3 (dev), bd9610ea6 (6.5), 37b37a399 (6.5)

    Description

      Looks like the new URL Javascript object does not properly encode query string parameters:

      let url = new URL('https://example.com/?a=b ~');
      console.log(url.href, url.toString()); // "https://example.com/?a=b%20~"
      // output is instead: "https://example.com/?a=b ~"
       
      url = new URL('https://google.com/search');
      url.searchParams.set('q', 'test me!'); // added parameter with a space and !
      console.log(url.href, url.toString()); // param is not even added?!
      

      Attachments

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

        Activity

          People

            olivier.decanniere Olivier De Cannière
            flaviotordini Flavio Tordini
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes