Skip to content

Commit 912cce2

Browse files
authored
Merge pull request #740 from SISheogorath/feature/moreHTML5
Extend HTML5 support by whitelisting various tags
2 parents f642a11 + 5d347d5 commit 912cce2

2 files changed

Lines changed: 20 additions & 1 deletion

File tree

public/css/markdown.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,3 +188,12 @@
188188
.markdown-body .alert > ul {
189189
margin-bottom: 0;
190190
}
191+
192+
/* Make details boxes look like on GitHub */
193+
.markdown-body details summary {
194+
cursor: pointer;
195+
}
196+
197+
.markdown-body summary {
198+
display: list-item;
199+
}

public/js/render.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,18 @@ whiteList['style'] = []
1919
whiteList['kbd'] = []
2020
// allow ifram tag with some safe attributes
2121
whiteList['iframe'] = ['allowfullscreen', 'name', 'referrerpolicy', 'sandbox', 'src', 'width', 'height']
22-
// allow summary tag
22+
// allow details tag
23+
whiteList['details'] = []
24+
// allow summary tag for details
2325
whiteList['summary'] = []
26+
// allow ruby tag
27+
whiteList['ruby'] = []
28+
// allow rt tag for ruby
29+
whiteList['rt'] = []
30+
// allow figure tag
31+
whiteList['figure'] = []
32+
// allow figcaption tag
33+
whiteList['figcaption'] = []
2434

2535
var filterXSSOptions = {
2636
allowCommentTag: true,

0 commit comments

Comments
 (0)