mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Remove trailing whitespace with URL in make_url at once
This commit is contained in:
parent
be8ed32562
commit
586de9ba8e
1 changed files with 1 additions and 0 deletions
|
@ -18,6 +18,7 @@ Create a URL object from a string. Does various helpful browsery things like
|
|||
*/
|
||||
// TODO: about:failure->
|
||||
pub fn make_url(str_url: ~str, current_url: Option<Url>) -> Url {
|
||||
let str_url = str_url.trim_chars(& &[' ', '\t', '\n', '\r', '\x0C']).to_owned();
|
||||
let schm = url::get_scheme(str_url);
|
||||
let str_url = match schm {
|
||||
Err(_) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue