mirror of
https://github.com/home-assistant/frontend.git
synced 2025-11-08 18:39:40 +00:00
Do not allow SVG by default (#3640)
This commit is contained in:
@@ -10,6 +10,7 @@ let worker: any | undefined;
|
||||
@customElement("ha-markdown")
|
||||
class HaMarkdown extends UpdatingElement {
|
||||
@property() public content = "";
|
||||
@property({ type: Boolean }) public allowSvg = false;
|
||||
|
||||
protected update(changedProps) {
|
||||
super.update(changedProps);
|
||||
@@ -22,11 +23,17 @@ class HaMarkdown extends UpdatingElement {
|
||||
}
|
||||
|
||||
private async _render() {
|
||||
this.innerHTML = await worker.renderMarkdown(this.content, {
|
||||
breaks: true,
|
||||
gfm: true,
|
||||
tables: true,
|
||||
});
|
||||
this.innerHTML = await worker.renderMarkdown(
|
||||
this.content,
|
||||
{
|
||||
breaks: true,
|
||||
gfm: true,
|
||||
tables: true,
|
||||
},
|
||||
{
|
||||
allowSvg: this.allowSvg,
|
||||
}
|
||||
);
|
||||
|
||||
this._resize();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user