mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
make_url: Drop whitespace within data: URLs
This commit is contained in:
parent
3824a01dc5
commit
2aa05e8d23
1 changed files with 6 additions and 0 deletions
|
@ -62,6 +62,12 @@ pub fn make_url(str_url: ~str, current_url: Option<Url>) -> Url {
|
|||
_ => str_url
|
||||
}
|
||||
},
|
||||
~"data" => {
|
||||
// Drop whitespace within data: URLs, e.g. newlines within a base64
|
||||
// src="..." block. Whitespace intended as content should be
|
||||
// %-encoded or base64'd.
|
||||
str_url.iter().filter(|&c| !c.is_whitespace()).collect()
|
||||
},
|
||||
_ => str_url
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue