server: preserve class attribute on sanitized html

This commit is contained in:
Bill Thiede 2024-03-26 08:25:37 -07:00
parent c74cd66826
commit ff1c3f5791

View File

@ -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",