]> source.dussan.org Git - gitea.git/commitdiff
Fix label render containing invalid HTML (#27752)
authorEarl Warren <109468362+earl-warren@users.noreply.github.com>
Mon, 23 Oct 2023 23:02:00 +0000 (01:02 +0200)
committerGitHub <noreply@github.com>
Mon, 23 Oct 2023 23:02:00 +0000 (23:02 +0000)
- The label HTML contained a quote that wasn't being closed.

Refs: https://codeberg.org/forgejo/forgejo/pulls/1651

(cherry picked from commit e2bc2c9a1fff482c49dbeb3a51e4e1c698bf506c)

Co-authored-by: Gusted <postmaster@gusted.xyz>
modules/templates/util_render.go

index ed6eae326a9687be8b5a297d84f40e6511aeb85b..84c3a1587afac686b6f52d48d292358a29bcbfff 100644 (file)
@@ -179,7 +179,7 @@ func RenderLabel(ctx context.Context, label *issues_model.Label) template.HTML {
 
        s := fmt.Sprintf("<span class='ui label scope-parent' title='%s'>"+
                "<div class='ui label scope-left' style='color: %s !important; background-color: %s !important'>%s</div>"+
-               "<div class='ui label scope-right' style='color: %s !important; background-color: %s !important''>%s</div>"+
+               "<div class='ui label scope-right' style='color: %s !important; background-color: %s !important'>%s</div>"+
                "</span>",
                description,
                textColor, scopeColor, scopeText,