diff --git a/website/client/components/tasks/task.vue b/website/client/components/tasks/task.vue index b3d9cb9517..fbdc7a2d2e 100644 --- a/website/client/components/tasks/task.vue +++ b/website/client/components/tasks/task.vue @@ -43,7 +43,7 @@ span.text {{ $t('delete') }} .task-notes.small-text( - v-html="task.notes", + v-markdown="task.notes", :class="{'has-checklist': task.notes && hasChecklist}", ) .checklist(v-if="canViewchecklist", :class="{isOpen: !task.collapseChecklist}") diff --git a/website/client/directives/markdown.js b/website/client/directives/markdown.js index 98c174f431..2f892675af 100644 --- a/website/client/directives/markdown.js +++ b/website/client/directives/markdown.js @@ -3,7 +3,7 @@ import habiticaMarkdown from 'habitica-markdown'; export default function markdown (el, {value, oldValue}) { if (value === oldValue) return; - if (value) { + if (value || value === '') { el.innerHTML = habiticaMarkdown.render(String(value)); } el.classList.add('markdown');