summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2020-03-26 23:47:34 +0000
committerGitHub <noreply@github.com>2020-03-26 23:47:34 +0000
commitcf4f2cfa3ee0e71632df971e154c7b926c39ba80 (patch)
tree7e379a15df13d5e762cbe0598ad56f195a342f4b /modules
parentbbd910ed1b4f52ee66a5cdd8d11f856598161bef (diff)
downloadgitea-cf4f2cfa3ee0e71632df971e154c7b926c39ba80.tar.gz
gitea-cf4f2cfa3ee0e71632df971e154c7b926c39ba80.zip
Fix internal server error on checkboxes (#10845)
Annoyingly goldmarks SetAttributeString requires that the value of the attribute is still a []byte but does not make it clear in the documentation. Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'modules')
-rw-r--r--modules/markup/markdown/goldmark.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/markup/markdown/goldmark.go b/modules/markup/markdown/goldmark.go
index 5b16fa8e84..70f47e289e 100644
--- a/modules/markup/markdown/goldmark.go
+++ b/modules/markup/markdown/goldmark.go
@@ -85,7 +85,7 @@ func (g *GiteaASTTransformer) Transform(node *ast.Document, reader text.Reader,
case *ast.List:
if v.HasChildren() && v.FirstChild().HasChildren() && v.FirstChild().FirstChild().HasChildren() {
if _, ok := v.FirstChild().FirstChild().FirstChild().(*east.TaskCheckBox); ok {
- v.SetAttributeString("class", "task-list")
+ v.SetAttributeString("class", []byte("task-list"))
}
}
}