Merge pull request #740 from SISheogorath/feature/moreHTML5

Extend HTML5 support by whitelisting various tags
This commit is contained in:
Christoph (Sheogorath) Kern 2018-02-25 21:50:11 +01:00 committed by GitHub
commit 912cce2b40
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 1 deletions

View file

@ -188,3 +188,12 @@
.markdown-body .alert > ul { .markdown-body .alert > ul {
margin-bottom: 0; margin-bottom: 0;
} }
/* Make details boxes look like on GitHub */
.markdown-body details summary {
cursor: pointer;
}
.markdown-body summary {
display: list-item;
}

View file

@ -19,8 +19,18 @@ whiteList['style'] = []
whiteList['kbd'] = [] whiteList['kbd'] = []
// allow ifram tag with some safe attributes // allow ifram tag with some safe attributes
whiteList['iframe'] = ['allowfullscreen', 'name', 'referrerpolicy', 'sandbox', 'src', 'width', 'height'] whiteList['iframe'] = ['allowfullscreen', 'name', 'referrerpolicy', 'sandbox', 'src', 'width', 'height']
// allow summary tag // allow details tag
whiteList['details'] = []
// allow summary tag for details
whiteList['summary'] = [] whiteList['summary'] = []
// allow ruby tag
whiteList['ruby'] = []
// allow rt tag for ruby
whiteList['rt'] = []
// allow figure tag
whiteList['figure'] = []
// allow figcaption tag
whiteList['figcaption'] = []
var filterXSSOptions = { var filterXSSOptions = {
allowCommentTag: true, allowCommentTag: true,