Support desc element in field
From [XEP-0004: Data Forms](https://xmpp.org/extensions/xep-0004.html#protocol-field): > ... > The <field/> element MAY contain any of the following child elements: > > <desc/> > The XML character data of this element provides a natural-language > description of the field, intended for presentation in a > user-agent (e.g., as a "tool-tip", help button, or explanatory text > provided near the field). The <desc/> element SHOULD NOT contain > newlines (the \n and \r characters), since layout is the > responsibility of a user agent, and any handling of > newlines (e.g., presentation in a user interface) is unspecified > herein. (Note: To provide a description of a field, it > is RECOMMENDED to use a <desc/> element rather than > a separate <field/> element of type "fixed".) > ...
This commit is contained in:
parent
cb3da52ba2
commit
a1bee56ee1
4 changed files with 46 additions and 2 deletions
|
|
@ -233,6 +233,7 @@ mod tests {
|
|||
type_: FieldType::ListSingle,
|
||||
label: None,
|
||||
required: false,
|
||||
desc: None,
|
||||
options: vec![],
|
||||
values: vec![String::from("whitelist")],
|
||||
media: vec![],
|
||||
|
|
@ -280,6 +281,7 @@ mod tests {
|
|||
type_: FieldType::ListSingle,
|
||||
label: None,
|
||||
required: false,
|
||||
desc: None,
|
||||
options: vec![],
|
||||
values: vec![String::from("whitelist")],
|
||||
media: vec![],
|
||||
|
|
|
|||
Loading…
Reference in a new issue