Skip to content

Commit 6ef50cb

Browse files
dunglasclaude
andcommitted
fix: canonicalize strippedValue in processHashForInit
processHashForInit computed strippedValue (the hash with a leading '#' removed) but then passed the original value to canonicalizeHash, which matches neither the WHATWG spec nor the behavior of the analogous search processor that uses its strippedValue. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 08fd249 commit 6ef50cb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

urlpattern.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,7 @@ func processHashForInit(value, hType string) (string, error) {
681681
return strippedValue, nil
682682
}
683683

684-
return canonicalizeHash(value)
684+
return canonicalizeHash(strippedValue)
685685
}
686686

687687
// https://urlpattern.spec.whatwg.org/#is-an-absolute-pathname

0 commit comments

Comments
 (0)