Don't break Markdown from external sources (#5713)

This commit is contained in:
Franck Nijhof
2020-05-02 15:19:26 +02:00
committed by GitHub
parent 79d1a2f458
commit c3832d56c3
8 changed files with 47 additions and 8 deletions

View File

@@ -12,6 +12,8 @@ class HaMarkdown extends UpdatingElement {
@property({ type: Boolean }) public allowSvg = false;
@property({ type: Boolean }) public breaks = false;
protected update(changedProps) {
super.update(changedProps);
@@ -26,7 +28,7 @@ class HaMarkdown extends UpdatingElement {
this.innerHTML = await worker.renderMarkdown(
this.content,
{
breaks: true,
breaks: this.breaks,
gfm: true,
tables: true,
},