Merge branch 'devel'

This commit is contained in:
Jason Streifling 2025-03-08 10:40:58 +01:00
commit a30e4d3796
2 changed files with 2 additions and 1 deletions

View File

@ -57,7 +57,7 @@ func newConfig() *Config {
MaxImgWidth: 1920, MaxImgWidth: 1920,
PDFDir: "/var/www/cpolis/pdfs", PDFDir: "/var/www/cpolis/pdfs",
Port: ":1664", Port: ":1664",
Version: "v0.17.0", Version: "v0.17.1",
WebDir: "/var/www/cpolis/web", WebDir: "/var/www/cpolis/web",
} }
} }

View File

@ -31,6 +31,7 @@ func ConvertToHTML(md string) (string, error) {
} }
p := bluemonday.UGCPolicy() p := bluemonday.UGCPolicy()
p.AllowAttrs("id").OnElements("h1", "h2", "h3", "h4", "h5", "h6")
html := p.Sanitize(buf.String()) html := p.Sanitize(buf.String())
return html, nil return html, nil