Skip to content

Commit

Permalink
Making create attribute lowercase
Browse files Browse the repository at this point in the history
  • Loading branch information
mattnenterprise committed Jan 13, 2016
1 parent cbb5a0d commit e684a20
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
6 changes: 4 additions & 2 deletions components/script/dom/document.rs
Expand Up @@ -1847,12 +1847,14 @@ impl DocumentMethods for Document {
}

// https://dom.spec.whatwg.org/#dom-document-createattribute
fn CreateAttribute(&self, local_name: DOMString) -> Fallible<Root<Attr>> {
fn CreateAttribute(&self, mut local_name: DOMString) -> Fallible<Root<Attr>> {
if xml_name_type(&local_name) == InvalidXMLName {
debug!("Not a valid element name");
return Err(Error::InvalidCharacter);
}

if self.is_html_document {
local_name.make_ascii_lowercase();
}
let name = Atom::from(&*local_name);
// repetition used because string_cache::atom::Atom is non-copyable
let l_name = Atom::from(&*local_name);
Expand Down

This file was deleted.

0 comments on commit e684a20

Please sign in to comment.