Enum ruma::html::HtmlSanitizerMode
source · pub enum HtmlSanitizerMode {
Strict,
Compat,
}
Available on crate feature
html
only.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
matrix
scheme 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 copy 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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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.source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more