server: preserve class attribute on sanitized html
This commit is contained in:
parent
c74cd66826
commit
ff1c3f5791
@ -83,8 +83,9 @@ pub fn sanitize_html(html: &str) -> Result<String, SanitizeError> {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
// Default's don't allow style, but we want to preserve that.
|
// Default's don't allow style, but we want to preserve that.
|
||||||
let attributes =
|
let attributes = hashset![
|
||||||
hashset!["align", "bgcolor", "color", "height", "lang", "title", "width", "style",];
|
"align", "bgcolor", "class", "color", "height", "lang", "title", "width", "style",
|
||||||
|
];
|
||||||
|
|
||||||
let tags = hashset![
|
let tags = hashset![
|
||||||
"a",
|
"a",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user