Skip to content

Commit 9275b21

Browse files
authored
Fix to allow li outside of lists
Closes GH-18. Closes GH-19. Reviewed-by: Titus Wormer <[email protected]>
1 parent 71283f0 commit 9275b21

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

lib/github.json

-6
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@
88
"id"
99
],
1010
"ancestors": {
11-
"li": [
12-
"ol",
13-
"ul"
14-
],
1511
"tbody": [
1612
"table"
1713
],
@@ -60,8 +56,6 @@
6056
"h4",
6157
"h5",
6258
"h6",
63-
"h7",
64-
"h8",
6559
"br",
6660
"b",
6761
"i",

test.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -448,10 +448,11 @@ test('sanitize()', function (t) {
448448
})
449449

450450
st.test('`li`', function (sst) {
451+
451452
sst.deepEqual(
452453
sanitize(h('li', 'alert(1)')),
453-
u('text', 'alert(1)'),
454-
'should not allow `li` outside list'
454+
h('li', 'alert(1)'),
455+
'should allow `li` outside list'
455456
)
456457

457458
sst.deepEqual(

0 commit comments

Comments
 (0)