Enum ruma_html::HtmlSanitizerMode
source · 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
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
source§fn eq(&self, other: &HtmlSanitizerMode) -> bool
fn eq(&self, other: &HtmlSanitizerMode) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
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
)