Bug 214318 - Setting URL.hash to '#' should set empty fragment
Summary: Setting URL.hash to '#' should set empty fragment
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Rob Buis
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-07-14 13:25 PDT by Rob Buis
Modified: 2020-07-20 12:05 PDT (History)
8 users (show)

See Also:


Attachments
Patch (8.02 KB, patch)
2020-07-14 13:35 PDT, Rob Buis
no flags Details | Formatted Diff | Diff
Patch (7.84 KB, patch)
2020-07-17 06:50 PDT, Rob Buis
no flags Details | Formatted Diff | Diff
Patch (7.90 KB, patch)
2020-07-20 03:14 PDT, Rob Buis
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rob Buis 2020-07-14 13:25:27 PDT
Setting URL.hash to '#' should preserve '#'
Comment 1 Rob Buis 2020-07-14 13:35:09 PDT
Created attachment 404273 [details]
Patch
Comment 2 Rob Buis 2020-07-17 06:50:00 PDT
Created attachment 404558 [details]
Patch
Comment 3 Rob Buis 2020-07-20 03:14:41 PDT
Created attachment 404707 [details]
Patch
Comment 4 Rob Buis 2020-07-20 05:18:48 PDT
The equivalent patch landed today in Chrome:
https://chromium-review.googlesource.com/c/chromium/src/+/2302696
Comment 5 EWS 2020-07-20 06:51:19 PDT
Committed r264599: <https://trac.webkit.org/changeset/264599>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 404707 [details].
Comment 6 Radar WebKit Bug Importer 2020-07-20 06:52:17 PDT
<rdar://problem/65822989>
Comment 7 Darin Adler 2020-07-20 10:32:32 PDT
Comment on attachment 404707 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=404707&action=review

> Source/WebCore/html/URLDecomposition.cpp:245
> +        auto newFragment = value.startsWith('#') ? StringView(value).substring(1) : StringView(value);

Not new to this patch, but just noticed: Should just be "value" instead of "StringView(value)" in the two places on this line.