diff options
Diffstat (limited to 'components/script/script_thread.rs')
-rw-r--r-- | components/script/script_thread.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs index 30462f3823b..9b00846dbb3 100644 --- a/components/script/script_thread.rs +++ b/components/script/script_thread.rs @@ -1739,7 +1739,7 @@ impl ScriptThread { // Start with the scheme data of the parsed URL; // append question mark and query component, if any; // append number sign and fragment component if any. - let encoded = &incomplete.url.as_url().unwrap()[Position::BeforePath..]; + let encoded = &incomplete.url[Position::BeforePath..]; // Percent-decode (8.) and UTF-8 decode (9.) let script_source = percent_decode(encoded.as_bytes()).decode_utf8_lossy(); |