mirror of https://github.com/vector-im/riot-web
Merge pull request #333 from aviraldg/feature-img-data
feat: unblacklist img tags with data URIspull/21833/head
commit
22ae60fb45
|
@ -28,7 +28,7 @@ var sanitizeHtmlParams = {
|
|||
// deliberately no h1/h2 to stop people shouting.
|
||||
'h3', 'h4', 'h5', 'h6', 'blockquote', 'p', 'a', 'ul', 'ol',
|
||||
'nl', 'li', 'b', 'i', 'u', 'strong', 'em', 'strike', 'code', 'hr', 'br', 'div',
|
||||
'table', 'thead', 'caption', 'tbody', 'tr', 'th', 'td', 'pre'
|
||||
'table', 'thead', 'caption', 'tbody', 'tr', 'th', 'td', 'pre', 'img',
|
||||
],
|
||||
allowedAttributes: {
|
||||
// custom ones first:
|
||||
|
@ -42,7 +42,9 @@ var sanitizeHtmlParams = {
|
|||
selfClosing: [ 'img', 'br', 'hr', 'area', 'base', 'basefont', 'input', 'link', 'meta' ],
|
||||
// URL schemes we permit
|
||||
allowedSchemes: [ 'http', 'https', 'ftp', 'mailto' ],
|
||||
allowedSchemesByTag: {},
|
||||
allowedSchemesByTag: {
|
||||
img: [ 'data' ],
|
||||
},
|
||||
|
||||
transformTags: { // custom to matrix
|
||||
// add blank targets to all hyperlinks except vector URLs
|
||||
|
|
Loading…
Reference in New Issue