SIGN IN SIGN UP

Fix fragment parsing for relative URI in RfcUriParser

When parsing a relative URI such as `path2#foo`, RfcUriParser's
SCHEME_OR_PATH state advanced to FRAGMENT without moving the component
index past the `#` character, so the captured fragment included the
entire input (`path2#foo`) instead of just `foo`. As a result,
`toUriString()` produced `path2#path2#foo`.

Update the SCHEME_OR_PATH `#` transition to advance the component
index to `i + 1`, matching the sibling `?` -> QUERY transition in the
same state and every other `-> FRAGMENT` transition in the parser.
URIs with a `/` in the path are unaffected because they leave
SCHEME_OR_PATH for PATH on the first slash; the WhatWG parser already
handled this case correctly.

Closes gh-36762

Signed-off-by: daguimu <daguimu.geek@gmail.com>
D
daguimu committed
c2191e3ce23001d44005cbc80e6cff4dffe84e6e
Parent: 175c1f9
Committed by rstoyanchev <rossen.stoyanchev@broadcom.com> on 6/1/2026, 9:52:37 AM