summaryrefslogtreecommitdiffstats
path: root/modules/markup/sanitizer.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/markup/sanitizer.go')
-rw-r--r--modules/markup/sanitizer.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/markup/sanitizer.go b/modules/markup/sanitizer.go
index 45d363b37e..0ebb3ff88b 100644
--- a/modules/markup/sanitizer.go
+++ b/modules/markup/sanitizer.go
@@ -47,6 +47,9 @@ func ReplaceSanitizer() {
// Allow keyword markup
sanitizer.policy.AllowAttrs("class").Matching(regexp.MustCompile(`^` + keywordClass + `$`)).OnElements("span")
+
+ // Allow <kbd> tags for keyboard shortcut styling
+ sanitizer.policy.AllowElements("kbd")
}
// Sanitize takes a string that contains a HTML fragment or document and applies policy whitelist.