aboutsummaryrefslogtreecommitdiffstats
path: root/modules/markup/sanitizer_test.go
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2020-05-03 21:17:24 +0100
committerGitHub <noreply@github.com>2020-05-03 17:17:24 -0300
commitce66ca7f9f20ee69739e8800a4a629abbe9d25ac (patch)
treee634913f0abbf0aa54910ea79d09e2543df82cd5 /modules/markup/sanitizer_test.go
parent940ed923920ae662efa6967679e60297832c4af8 (diff)
downloadgitea-ce66ca7f9f20ee69739e8800a4a629abbe9d25ac.tar.gz
gitea-ce66ca7f9f20ee69739e8800a4a629abbe9d25ac.zip
Restore checkbox rendering and prevent poor sanitization of spans (#11277)
* Add test Signed-off-by: Andrew Thornton <art27@cantab.net> * Restore checkbox rendering and prevent poor sanitization of spans Signed-off-by: Andrew Thornton <art27@cantab.net> * Also fix preview context Signed-off-by: Andrew Thornton <art27@cantab.net> * Also fix preview context Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'modules/markup/sanitizer_test.go')
-rw-r--r--modules/markup/sanitizer_test.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/markup/sanitizer_test.go b/modules/markup/sanitizer_test.go
index be7bdd20e7..3e8dcecd50 100644
--- a/modules/markup/sanitizer_test.go
+++ b/modules/markup/sanitizer_test.go
@@ -38,6 +38,11 @@ func Test_Sanitizer(t *testing.T) {
// <kbd> tags
`<kbd>Ctrl + C</kbd>`, `<kbd>Ctrl + C</kbd>`,
+ `<i class="dropdown icon">NAUGHTY</i>`, `<i>NAUGHTY</i>`,
+ `<i class="icon dropdown"></i>`, `<i class="icon dropdown"></i>`,
+ `<span class="ui checkbox"><input type="checkbox" readonly="readonly"/><label>unchecked</label></span>`, `<span class="ui checkbox"><input type="checkbox" readonly="readonly"/><label>unchecked</label></span>`,
+ `<span class="emoji dropdown">NAUGHTY</span>`, `<span>NAUGHTY</span>`,
+ `<span class="emoji">contents</span>`, `<span class="emoji">contents</span>`,
}
for i := 0; i < len(testCases); i += 2 {