mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-13 21:53:43 +01:00
Merge pull request #1340 from sharelatex/jel-sanitize-html-options
HTML sanitize options for icons and tables GitOrigin-RevId: 1f2cc444120ebbefb9583eda95e8edfba4e7d1d8
This commit is contained in:
committed by
sharelatex
parent
c6879a2184
commit
a521a86fb7
@@ -502,7 +502,7 @@ module.exports = settings =
|
||||
modules:
|
||||
sanitize:
|
||||
options:
|
||||
allowedTags: [ 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'blockquote', 'p', 'a', 'ul', 'ol', 'nl', 'li', 'b', 'i', 'strong', 'em', 'strike', 'code', 'hr', 'br', 'div', 'table', 'thead', 'caption', 'tbody', 'tr', 'th', 'td', 'pre', 'iframe', 'img', 'figure', 'figcaption', 'span', 'source', 'video', 'del' ]
|
||||
allowedTags: [ 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'blockquote', 'p', 'a', 'ul', 'ol', 'nl', 'li', 'b', 'i', 'strong', 'em', 'strike', 'code', 'hr', 'br', 'div', 'table', 'thead', 'col', 'caption', 'tbody', 'tr', 'th', 'td', 'tfoot', 'pre', 'iframe', 'img', 'figure', 'figcaption', 'span', 'source', 'video', 'del' ]
|
||||
allowedAttributes:
|
||||
'a': [ 'href', 'name', 'target', 'class', 'event-tracking', 'event-tracking-ga', 'event-tracking-label', 'event-tracking-trigger' ]
|
||||
'div': [ 'class', 'id', 'style' ]
|
||||
@@ -512,10 +512,15 @@ module.exports = settings =
|
||||
'h4': [ 'class', 'id' ]
|
||||
'h5': [ 'class', 'id' ]
|
||||
'h6': [ 'class', 'id' ]
|
||||
'col': [ 'width' ]
|
||||
'figure': [ 'class', 'id', 'style']
|
||||
'figcaption': [ 'class', 'id', 'style']
|
||||
'i': [ 'aria-hidden', 'aria-label', 'class', 'id' ]
|
||||
'iframe': [ 'allowfullscreen', 'frameborder', 'height', 'src', 'style', 'width' ]
|
||||
'img': [ 'alt', 'class', 'src', 'style' ]
|
||||
'source': [ 'src', 'type' ]
|
||||
'span': [ 'class', 'id', 'style' ]
|
||||
'table': [ 'border', 'class', 'id', 'style' ]
|
||||
'td': [ 'colspan', 'rowspan', 'headers' ]
|
||||
'th': [ 'abbr', 'headers', 'colspan', 'rowspan', 'scope', 'sorted' ]
|
||||
'video': [ 'alt', 'class', 'controls', 'height', 'width' ]
|
||||
|
||||
Reference in New Issue
Block a user