diff options
Diffstat (limited to 'components/script/dom/css.rs')
-rw-r--r-- | components/script/dom/css.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/components/script/dom/css.rs b/components/script/dom/css.rs index e1d2917084e..d53a94e5da2 100644 --- a/components/script/dom/css.rs +++ b/components/script/dom/css.rs @@ -3,7 +3,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use cssparser::serialize_identifier; -use dom::bindings::error::{Error, Fallible}; +use dom::bindings::error::Fallible; use dom::bindings::global::GlobalRef; use dom::bindings::reflector::Reflector; use util::str::DOMString; @@ -16,9 +16,6 @@ pub struct CSS { impl CSS { // http://dev.w3.org/csswg/cssom/#serialize-an-identifier pub fn Escape(_: GlobalRef, ident: DOMString) -> Fallible<DOMString> { - if ident.bytes().any(|b| b == b'\0') { - return Err(Error::InvalidCharacter); - } let mut escaped = String::new(); serialize_identifier(&ident, &mut escaped).unwrap(); Ok(DOMString::from(escaped)) |