Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions modules/templates/util_render.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func RenderCommitMessage(ctx context.Context, msg string, metas map[string]strin
if len(msgLines) == 0 {
return template.HTML("")
}
return template.HTML(msgLines[0])
return RenderCodeBlock(template.HTML(msgLines[0]))
}

// RenderCommitMessageLinkSubject renders commit message as a XSS-safe link to
Expand All @@ -68,7 +68,7 @@ func RenderCommitMessageLinkSubject(ctx context.Context, msg, urlDefault string,
log.Error("RenderCommitMessageSubject: %v", err)
return template.HTML("")
}
return template.HTML(renderedMessage)
return RenderCodeBlock(template.HTML(renderedMessage))
}

// RenderCommitBody extracts the body of a commit message without its title.
Expand Down
4 changes: 2 additions & 2 deletions web_src/css/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,8 @@ a.label,

.inline-code-block {
padding: 2px 4px;
border-radius: var(--border-radius-medium);
background-color: var(--color-markup-code-block);
border-radius: .24em;
background-color: var(--color-label-bg);
}

/* fix Fomantic's line-height cutting off "g" on Windows Chrome with Segoe UI */
Expand Down