diff options
author | Earl Warren <earl-warren@noreply.codeberg.org> | 2024-11-21 19:15:34 +0100 |
---|---|---|
committer | Earl Warren <earl-warren@noreply.codeberg.org> | 2024-11-21 19:15:34 +0100 |
commit | 1597dc078d2ff3ccbb2ab71624d162f5910fcc9b (patch) | |
tree | 412df5af2e5bf7a93d8be6fa81332de55a1a8206 /modules | |
parent | i18n: update of translations from Codeberg Translate (#5960) (diff) | |
parent | chore(release-notes): notes for the week 2024-47 weekly cherry pick (diff) | |
download | forgejo-1597dc078d2ff3ccbb2ab71624d162f5910fcc9b.tar.xz forgejo-1597dc078d2ff3ccbb2ab71624d162f5910fcc9b.zip |
Merge pull request '[gitea] week 2024-47 cherry pick (gitea/main -> forgejo)' (#5997) from earl-warren/wcp/2024-47 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5997
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Diffstat (limited to 'modules')
-rw-r--r-- | modules/markup/asciicast/asciicast.go | 2 | ||||
-rw-r--r-- | modules/markup/csv/csv.go | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/modules/markup/asciicast/asciicast.go b/modules/markup/asciicast/asciicast.go index 0678062340..873029c1bd 100644 --- a/modules/markup/asciicast/asciicast.go +++ b/modules/markup/asciicast/asciicast.go @@ -39,7 +39,7 @@ const ( // SanitizerRules implements markup.Renderer func (Renderer) SanitizerRules() []setting.MarkupSanitizerRule { return []setting.MarkupSanitizerRule{ - {Element: "div", AllowAttr: "class", Regexp: regexp.MustCompile(playerClassName)}, + {Element: "div", AllowAttr: "class", Regexp: regexp.MustCompile("^" + playerClassName + "$")}, {Element: "div", AllowAttr: playerSrcAttr}, } } diff --git a/modules/markup/csv/csv.go b/modules/markup/csv/csv.go index 3d952b0de4..092eec7098 100644 --- a/modules/markup/csv/csv.go +++ b/modules/markup/csv/csv.go @@ -37,9 +37,9 @@ func (Renderer) Extensions() []string { // SanitizerRules implements markup.Renderer func (Renderer) SanitizerRules() []setting.MarkupSanitizerRule { return []setting.MarkupSanitizerRule{ - {Element: "table", AllowAttr: "class", Regexp: regexp.MustCompile(`data-table`)}, - {Element: "th", AllowAttr: "class", Regexp: regexp.MustCompile(`line-num`)}, - {Element: "td", AllowAttr: "class", Regexp: regexp.MustCompile(`line-num`)}, + {Element: "table", AllowAttr: "class", Regexp: regexp.MustCompile(`^data-table$`)}, + {Element: "th", AllowAttr: "class", Regexp: regexp.MustCompile(`^line-num$`)}, + {Element: "td", AllowAttr: "class", Regexp: regexp.MustCompile(`^line-num$`)}, } } |