Repository navigation
Description
servo/components/script/dom/location.rs
Lines 302 to 305 in f254841
| // Step 3: Parse url relative to the entry settings object. If that failed, | |
| // throw a "SyntaxError" DOMException. | |
| let base_url = self.entry_settings_object().api_base_url(); | |
| let url = match base_url.join(&url.0) { |
servo/components/script/dom/location.rs
Lines 330 to 332 in f254841
| // Step 2. Let urlRecord be the result of encoding-parsing a URL given url, relative to the entry settings object. | |
| let base_url = self.entry_settings_object().api_base_url(); | |
| let url = match base_url.join(&url.0) { |
servo/components/script/dom/location.rs
Lines 436 to 438 in f254841
| // Step 2: Let url be the result of encoding-parsing a URL given the given value, relative to the entry settings object. | |
| let base_url = self.entry_settings_object().api_base_url(); | |
| let url = match base_url.join(&value.0) { |
This code was written before the specification was changed to use the new algorithm, so we can replace these join calls with
servo/components/script/dom/document.rs
Lines 3452 to 3453 in f254841
| /// <https://html.spec.whatwg.org/multipage/#encoding-parsing-a-url> | |
| pub(crate) fn encoding_parse_a_url(&self, url: &str) -> Result<ServoUrl, url::ParseError> { |
Run the Location tests with ./mach test-wpt tests/wpt/tests/html/browsers/history/the-location-interface to see if there are any behaviour changes. It's possible that these particular APIs are not tested inside documents with non-UTF8 encodings.
Activity
servo-highfive commentedon Mar 21, 2026
Hi! If you have any questions regarding this issue, feel free to make a comment here, or ask it in Zulip.
If you intend to work on this issue, then add
@servo-highfive: assign meto your comment, and I'll assign this to you. 😄hkadijat commentedon Mar 21, 2026
@servo-highfive: assign me
servo-highfive commentedon Mar 21, 2026
Hey @hkadijat! Thanks for your interest in working on this issue. It's now assigned to you!
jayant911 commentedon Mar 22, 2026
Hey @hkadijat! if you are not working on this you can assign me.
jdm commentedon Mar 22, 2026
@jayant911 Please give assignees longer than one day before requesting reassignment. For issues labelled E-less-complex one week is an appropriate amount of time.
jayant911 commentedon Mar 22, 2026
Got it, thanks.
jdm commentedon Apr 11, 2026
@hkadijat Are you still working on this?
TG199 commentedon Apr 14, 2026
@servo-highfive assign me
servo-highfive commentedon Apr 14, 2026
It looks like this has already been assigned to someone. I'll leave the decision to a core contributor.
script: Use encoding_parse_a_url in Location assign (servo#44298)