widgets: html: allow falsy value

This commit is contained in:
bordun 2020-10-26 17:26:42 +01:00
parent 9cdda89ef8
commit de4050dbff

View file

@ -1012,7 +1012,7 @@ class Widget extends EventEmitter {
updateHtml(){
var extraHtml = this.getProp('html') ? sanitizeHtml(this.getProp('html'), {
var extraHtml = this.getProp('html') !== '' ? sanitizeHtml(this.getProp('html'), {
allowedTags: sanitizeHtml.defaults.allowedTags.concat(['img', 'h1', 'h2']).filter(x=>x!=='iframe'),
allowedAttributes: {
'*': [ 'title', 'class', 'style', 'type'],