mirror of
https://github.com/servo/servo
synced 2026-04-28 10:27:40 +02:00
Add picking of encoding for url encoded data
This commit is contained in:
@@ -321,7 +321,7 @@ impl HTMLFormElement {
|
||||
|
||||
result.push_str(&*format!("\r\n--{}--", boundary));
|
||||
|
||||
return result;
|
||||
result
|
||||
}
|
||||
|
||||
/// [Form submission](https://html.spec.whatwg.org/multipage/#concept-form-submit)
|
||||
@@ -377,6 +377,7 @@ impl HTMLFormElement {
|
||||
load_data.headers.set(ContentType::form_url_encoded());
|
||||
|
||||
form_urlencoded::Serializer::new(String::new())
|
||||
.encoding_override(Some(self.pick_encoding()))
|
||||
.extend_pairs(form_data.into_iter().map(|field| (field.name.clone(), field.value_str())))
|
||||
.finish()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user