Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/components/ha-markdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ class HaMarkdown extends EventsMixin(PolymerElement) {
content: {
type: String,
observer: '_render',
}
},
disableXssFilter: {
type: Boolean,
value: false,
},
};
}

Expand All @@ -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; },
Expand Down
2 changes: 1 addition & 1 deletion src/panels/config/config-entries/ha-config-flow.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/panels/profile/ha-mfa-module-setup-flow.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down