Available on crate feature
html
only.Expand description
Opinionated HTML parsing and manipulating library.
Like the rest of the Ruma crates, this crate is primarily meant to be used for the Matrix protocol. It should be able to be used to interact with any HTML document but will offer APIs focused on specificities of HTML in the Matrix specification..
§Features
matrix
- Allow to convert HTML elements data into enums with variants for elements and attributes suggested by the Matrix Specification.
Modules§
- matrix
matrix
- Types to work with HTML elements and attributes suggested by the Matrix Specification.
Structs§
- Attribute
- A tag attribute, e.g.
class="test"
in<div class="test" ...>
. - Children
- An iterator through the children of a node.
- Element
Attributes Replacement - The replacement of an element’s attributes.
- Element
Attributes Schemes - An element’s attributes’ URI schemes.
- Element
Data - The data of an HTML element.
- Html
- An HTML fragment.
- Name
Replacement - The replacement of a name.
- NodeRef
- A reference to an HTML node.
- Properties
Names - A list of properties names for a parent.
- Qual
Name - A fully qualified name (with a namespace), used to depict names of tags and attributes.
- Sanitizer
Config - Configuration to sanitize HTML elements and attributes.
Enums§
- Html
Sanitizer Mode - What HTML elements and attributes should be kept by the sanitizer.
- List
Behavior - The behavior of the setting.
- Node
Data - The data of a
Node
. - Remove
Reply Fallback - Whether to remove the rich reply fallback while sanitizing.
Functions§
- remove_
html_ reply_ fallback - Remove the rich reply fallback of the given HTML string.
- sanitize_
html - Sanitize the given HTML string.
Type Aliases§
- Local
Name - Namespace
- Prefix
- StrTendril
Tendril
for storing native Rust strings.