mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-19 15:26:36 +00:00
Disable XSS filter in flow step desc markdown (#1599)
This commit is contained in:
parent
f64ddf46e2
commit
c8ea4cd85e
@ -12,7 +12,11 @@ class HaMarkdown extends EventsMixin(PolymerElement) {
|
||||
content: {
|
||||
type: String,
|
||||
observer: '_render',
|
||||
}
|
||||
},
|
||||
disableXssFilter: {
|
||||
type: Boolean,
|
||||
value: false,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
@ -29,7 +33,7 @@ class HaMarkdown extends EventsMixin(PolymerElement) {
|
||||
loaded.then(
|
||||
({ marked, filterXSS }) => {
|
||||
this.marked = marked;
|
||||
this.filterXSS = filterXSS;
|
||||
this.filterXSS = this.disableXssFilter ? c => c : filterXSS;
|
||||
this._scriptLoaded = 1;
|
||||
},
|
||||
() => { this._scriptLoaded = 2; },
|
||||
|
@ -71,7 +71,7 @@ class HaConfigFlow extends
|
||||
|
||||
<template is="dom-if" if="[[_equals(_step.type, 'form')]]">
|
||||
<template is="dom-if" if="[[_computeStepDescription(localize, _step)]]">
|
||||
<ha-markdown content="[[_computeStepDescription(localize, _step)]]"></ha-markdown>
|
||||
<ha-markdown content="[[_computeStepDescription(localize, _step)]]" disable-xss-filter></ha-markdown>
|
||||
</template>
|
||||
|
||||
<ha-form
|
||||
|
@ -71,7 +71,7 @@ class HaMfaModuleSetupFlow extends
|
||||
|
||||
<template is="dom-if" if="[[_equals(_step.type, 'form')]]">
|
||||
<template is="dom-if" if="[[_computeStepDescription(localize, _step)]]">
|
||||
<ha-markdown content="[[_computeStepDescription(localize, _step)]]"></ha-markdown>
|
||||
<ha-markdown content="[[_computeStepDescription(localize, _step)]]" disable-xss-filter></ha-markdown>
|
||||
</template>
|
||||
|
||||
<ha-form
|
||||
|
Loading…
x
Reference in New Issue
Block a user