Skip to content

Commit 4612bb1

Browse files
SimonVanaccoasbiin
andauthored
fix: render markdown in notes on the dashboard (#6576)
Co-authored-by: Alexis Saettler <[email protected]>
1 parent 0f636e4 commit 4612bb1

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

resources/js/components/dashboard/DashboardLog.vue

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,7 @@
9999
<a :href="'people/' + note.contact.id">
100100
{{ note.name }}
101101
</a>
102-
<p>
103-
{{ note.body }}
104-
</p>
102+
<p v-html="compiledMarkdown(note.body)"></p>
105103
</div>
106104
</div>
107105
</template>
@@ -449,7 +447,11 @@ export default {
449447
.then(response => {
450448
this.tasks.splice(this.tasks.indexOf(task), 1);
451449
});
452-
}
450+
},
451+
452+
compiledMarkdown (text) {
453+
return text !== undefined && text !== null ? marked(text, { sanitize: true }) : '';
454+
},
453455
}
454456
};
455457
</script>

0 commit comments

Comments
 (0)