Skip to content

Commit 8c55c50

Browse files
author
bors-servo
authored
Auto merge of #402 - valenting:ascii-origin, r=SimonSapin
Change quirks::origin to return ASCII serialization This is to reflect the following change in the URL Standard: whatwg/url@20c3257 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/rust-url/402) <!-- Reviewable:end -->
2 parents 67367e9 + 8f56ac8 commit 8c55c50

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/quirks.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ pub fn set_href(url: &mut Url, value: &str) -> Result<(), ParseError> {
4646

4747
/// Getter for https://url.spec.whatwg.org/#dom-url-origin
4848
pub fn origin(url: &Url) -> String {
49-
url.origin().unicode_serialization()
49+
url.origin().ascii_serialization()
5050
}
5151

5252
/// Getter for https://url.spec.whatwg.org/#dom-url-protocol

tests/urltestdata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3536,7 +3536,7 @@
35363536
"input": "http://你好你好",
35373537
"base": "http://other.com/",
35383538
"href": "http://xn--6qqa088eba/",
3539-
"origin": "http://你好你好",
3539+
"origin": "http://xn--6qqa088eba",
35403540
"protocol": "http:",
35413541
"username": "",
35423542
"password": "",

0 commit comments

Comments
 (0)