diff options
author | Vincent Ricard <magic@magicninja.org> | 2020-10-09 18:05:52 +0200 |
---|---|---|
committer | Vincent Ricard <magic@magicninja.org> | 2020-10-09 18:05:52 +0200 |
commit | fa57ba5ca98605c35dff6c209b6cd17dcd864372 (patch) | |
tree | cb7e92bae87fb68196f806c063d99c36e8c768d7 /components/script/dom/htmlformelement.rs | |
parent | 14fd2e56e6fdbb9e059c819a8c7d44b06f6140da (diff) | |
download | servo-fa57ba5ca98605c35dff6c209b6cd17dcd864372.tar.gz servo-fa57ba5ca98605c35dff6c209b6cd17dcd864372.zip |
Make hidden input _charset_ check case insensitive
Diffstat (limited to 'components/script/dom/htmlformelement.rs')
-rw-r--r-- | components/script/dom/htmlformelement.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/components/script/dom/htmlformelement.rs b/components/script/dom/htmlformelement.rs index 54c9d710dd3..a4df1059a0c 100644 --- a/components/script/dom/htmlformelement.rs +++ b/components/script/dom/htmlformelement.rs @@ -1328,7 +1328,7 @@ pub struct FormDatum { impl FormDatum { pub fn replace_value(&self, charset: &str) -> String { - if self.name == "_charset_" && self.ty == "hidden" { + if self.name.to_ascii_lowercase() == "_charset_" && self.ty == "hidden" { return charset.to_string(); } @@ -1753,7 +1753,7 @@ pub fn encode_multipart_form_data( // Step 3 for entry in form_data.iter_mut() { // 3.1 - if entry.name == "_charset_" && entry.ty == "hidden" { + if entry.name.to_ascii_lowercase() == "_charset_" && entry.ty == "hidden" { entry.value = FormDatumValue::String(DOMString::from(charset.clone())); } // TODO: 3.2 |