New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 601425 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Email to this user bounced
Closed: Apr 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

new URLSearchParams() should strip leading "?"

Reported by sigbjo...@opera.com, Apr 7 2016

Issue description

Following https://github.com/whatwg/url/issues/81 , the URLSearchParams(query) constructor should remove any leading "?" from the query string.
 
Labels: -Pri-3 Pri-2
Project Member

Comment 2 by bugdroid1@chromium.org, Apr 21 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/06b35c408742d5e63be72ad7c2fed4073b7caf12

commit 06b35c408742d5e63be72ad7c2fed4073b7caf12
Author: sigbjornf <sigbjornf@opera.com>
Date: Thu Apr 21 19:19:49 2016

Have (new URLSearchParams(initString)) skip initial '?'.

The spec now requires that when a URLSearchParams is initialized from
a string, an initial '?' should be ignored from that string,

 https://url.spec.whatwg.org/#dom-urlsearchparams-urlsearchparams

It accommodating usage like (new URLSearchParams(url.search))

R=
BUG= 601425 

Review URL: https://codereview.chromium.org/1906773002

Cr-Commit-Position: refs/heads/master@{#388842}

[modify] https://crrev.com/06b35c408742d5e63be72ad7c2fed4073b7caf12/third_party/WebKit/LayoutTests/fast/domurl/urlsearchparams-constructor.html
[modify] https://crrev.com/06b35c408742d5e63be72ad7c2fed4073b7caf12/third_party/WebKit/Source/core/dom/URLSearchParams.cpp

Comment 3 by sigbjo...@opera.com, Apr 22 2016

Owner: sigbjo...@opera.com
Status: Fixed (was: Untriaged)
This bug is still exist in Google Chrome 51.0.2704.63 (64-bit)

#2 is available in >= 52.0.2714.0

Sign in to add a comment