You want some user content displayed inside the browser, which works only with HTML (also images etc. but that's not very useful for blog articles). Which means v-html
is your only choice...
v-html
is not evil, problem is what you put inside. Markdown doesn't save you here as it allows inline HTML
So the only way is to sanitize user content.
As the content is created once and displayed multiple times, it makes sense to do this MD -> HTML transformation + sanitization only once when user is saving new article, save the result somewhere and later used it as a content for v-html
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…