mirror of
https://github.com/Orange-OpenSource/hurl.git
synced 2024-09-19 01:39:04 +03:00
Add support for htmlEscape and htmlUnescape in hurlfmt
This commit is contained in:
parent
db486f9695
commit
e6028f390a
@ -535,6 +535,15 @@ impl ToJson for FilterValue {
|
||||
FilterValue::UrlDecode { .. } => {
|
||||
attributes.push(("type".to_string(), JValue::String("urlDecode".to_string())));
|
||||
}
|
||||
FilterValue::HtmlEscape { .. } => {
|
||||
attributes.push(("type".to_string(), JValue::String("htmlEscape".to_string())));
|
||||
}
|
||||
FilterValue::HtmlUnescape { .. } => {
|
||||
attributes.push((
|
||||
"type".to_string(),
|
||||
JValue::String("htmlUnescape".to_string()),
|
||||
));
|
||||
}
|
||||
FilterValue::ToInt { .. } => {
|
||||
attributes.push(("type".to_string(), JValue::String("toInt".to_string())));
|
||||
}
|
||||
|
@ -1152,6 +1152,10 @@ impl Tokenizable for Filter {
|
||||
FilterValue::Count { .. } => vec![Token::FilterType(String::from("count"))],
|
||||
FilterValue::UrlEncode { .. } => vec![Token::FilterType(String::from("urlEncode"))],
|
||||
FilterValue::UrlDecode { .. } => vec![Token::FilterType(String::from("urlDecode"))],
|
||||
FilterValue::HtmlEscape { .. } => vec![Token::FilterType(String::from("htmlEscape"))],
|
||||
FilterValue::HtmlUnescape { .. } => {
|
||||
vec![Token::FilterType(String::from("htmlUnescape"))]
|
||||
}
|
||||
FilterValue::ToInt { .. } => vec![Token::FilterType(String::from("toInt"))],
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user