You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The URL rule says it must start with an absoluteURL or relativeURL
The absoluteURL rules says it may start with generic-RL
The generic-RL rule says that we split the string at the first ":", so scheme is "h" and relativeURL is "#ash"
relativeURL may be a net_path (starts with "//"), abs_path ("/") or release_path
rel_path says everything is optional; it could be an empty string.
Therefore, considering the rule in URL which splits at the first "#", the fragment should be "ash"
In fact, the RFC actually recommends the fragment be split before doing any other parsing:
If the parse string contains a crosshatch "#" character, then the
substring after the first (left-most) crosshatch "#" and up to the
end of the parse string is the <fragment> identifier. If the
crosshatch is the last character, or no crosshatch is present, then
the fragment identifier is empty. The matched substring, including
the crosshatch character, is removed from the parse string before
continuing.
The text was updated successfully, but these errors were encountered:
Environment
Xcode 13 GM, macOS 11.6
Additional Detail from JIRA
md5: 8014ceb578ffcabb4bed4101e4ee1a11
Issue Description:
Here, the scheme is "h" and the path is "%23ash". Most other parsers would say that the scheme is "h", the path is empty, and the fragment is "ash".
Compare:
The documentation says URL implements RFC-1808, but this would seem to be a point of non-compliance. From the RFC:
So looking at the string "h:#ash"
The URL rule says it must start with an absoluteURL or relativeURL
The absoluteURL rules says it may start with generic-RL
The generic-RL rule says that we split the string at the first ":", so scheme is "h" and relativeURL is "#ash"
relativeURL may be a net_path (starts with "//"), abs_path ("/") or release_path
rel_path says everything is optional; it could be an empty string.
Therefore, considering the rule in URL which splits at the first "#", the fragment should be "ash"
In fact, the RFC actually recommends the fragment be split before doing any other parsing:
The text was updated successfully, but these errors were encountered: