Add support for escaped brakets in form fields. Fix #503
This commit is contained in:
parent
1431145afa
commit
4c799f736f
|
@ -177,6 +177,9 @@ impl<'a> From<&'a AutoMatch> for Match {
|
||||||
});
|
});
|
||||||
let new_replace = new_replace.to_string();
|
let new_replace = new_replace.to_string();
|
||||||
|
|
||||||
|
// Convert escaped brakets in forms
|
||||||
|
let form = form.replace("\\{", "{ ").replace("\\}", " }");
|
||||||
|
|
||||||
// Convert the form data to valid variables
|
// Convert the form data to valid variables
|
||||||
let mut params = Mapping::new();
|
let mut params = Mapping::new();
|
||||||
if let Some(fields) = &other.form_fields {
|
if let Some(fields) = &other.form_fields {
|
||||||
|
@ -186,7 +189,7 @@ impl<'a> From<&'a AutoMatch> for Match {
|
||||||
});
|
});
|
||||||
params.insert(Value::from("fields"), Value::from(mapping_fields));
|
params.insert(Value::from("fields"), Value::from(mapping_fields));
|
||||||
}
|
}
|
||||||
params.insert(Value::from("layout"), Value::from(form.to_owned()));
|
params.insert(Value::from("layout"), Value::from(form));
|
||||||
|
|
||||||
let vars = vec![MatchVariable {
|
let vars = vec![MatchVariable {
|
||||||
name: "form1".to_owned(),
|
name: "form1".to_owned(),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user