mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Fixes #2969 by only stripping HTML whitespace
This commit is contained in:
parent
05f62f7cf0
commit
817d232f2b
1 changed files with 2 additions and 2 deletions
|
@ -48,7 +48,7 @@ use hubbub::hubbub::{QuirksMode, NoQuirks, LimitedQuirks, FullQuirks};
|
||||||
use layout_interface::{DocumentDamageLevel, ContentChangedDocumentDamage};
|
use layout_interface::{DocumentDamageLevel, ContentChangedDocumentDamage};
|
||||||
use servo_util::namespace;
|
use servo_util::namespace;
|
||||||
use servo_util::namespace::{Namespace, Null};
|
use servo_util::namespace::{Namespace, Null};
|
||||||
use servo_util::str::{DOMString, null_str_as_empty_ref};
|
use servo_util::str::{DOMString, null_str_as_empty_ref, split_html_space_chars};
|
||||||
|
|
||||||
use std::collections::hashmap::HashMap;
|
use std::collections::hashmap::HashMap;
|
||||||
use std::ascii::StrAsciiExt;
|
use std::ascii::StrAsciiExt;
|
||||||
|
@ -520,7 +520,7 @@ impl<'a> DocumentMethods for JSRef<'a, Document> {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
let v: Vec<&str> = title.as_slice().words().collect();
|
let v: Vec<&str> = split_html_space_chars(title.as_slice()).collect();
|
||||||
let title = v.connect(" ");
|
let title = v.connect(" ");
|
||||||
title.as_slice().trim().to_string()
|
title.as_slice().trim().to_string()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue