pub enum HtmlSanitizerMode {
Strict,
Compat,
}Expand description
What HTML elements and attributes should be kept by the sanitizer.
Variants§
Strict
Keep only the elements and attributes suggested in the Matrix specification.
In addition to filtering elements and attributes listed in the Matrix specification, it also removes elements that are nested more than 100 levels deep.
Deprecated elements and attributes are also replaced when applicable.
Compat
Like Strict mode, with additional elements and attributes that are not yet included in
the spec, but are reasonable to keep.
Differences with Strict mode:
- The
matrixscheme is allowed in links.
Trait Implementations§
Source§impl Clone for HtmlSanitizerMode
impl Clone for HtmlSanitizerMode
Source§fn clone(&self) -> HtmlSanitizerMode
fn clone(&self) -> HtmlSanitizerMode
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HtmlSanitizerMode
impl Debug for HtmlSanitizerMode
Source§impl PartialEq for HtmlSanitizerMode
impl PartialEq for HtmlSanitizerMode
impl Copy for HtmlSanitizerMode
impl Eq for HtmlSanitizerMode
impl StructuralPartialEq for HtmlSanitizerMode
Auto Trait Implementations§
impl Freeze for HtmlSanitizerMode
impl RefUnwindSafe for HtmlSanitizerMode
impl Send for HtmlSanitizerMode
impl Sync for HtmlSanitizerMode
impl Unpin for HtmlSanitizerMode
impl UnwindSafe for HtmlSanitizerMode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.