Skip to content

πŸ“š The open-source, offline-first Notion, Obsidian & Confluence alternative. Advanced Markdown, multi-tenant teams, OIDC/SSO, and local S3 backups. Deploy in one command.

Fix escape "preserveAspectRatio" attribute on katex docs cause break of \over* commands

Smaug6739c0049718cbf1
diff --git a/backend/utils/escape-html.go b/backend/utils/escape-html.go
index a4e2fe12..a7e57e9f 100644
--- a/backend/utils/escape-html.go
+++ b/backend/utils/escape-html.go
@@ -71,7 +71,7 @@ func InitBluemonday() {
// SVG-specific attributes
policy.AllowAttrs(
- "viewBox", "fill-rule", "d", "x", "y", "cx", "cy", "r", "rx", "ry", "points",
+ "viewBox", "fill-rule", "d", "x", "y", "cx", "cy", "r", "rx", "ry", "points", "stroke", "stroke-width", "fill", "preserveAspectRatio", "xmlns",
).OnElements("svg", "path", "line", "polygon", "polyline", "rect", "circle", "ellipse", "text")
// Links