问题描述
我有以下降价:
> Acronis True Image does not allow to clone a single partition; only cloning of an entire disk is possible
> [Acronis True Image: how to clone a disk | KNowledge Base](https://kb.acronis.com/content/56634)
But you can use <a href="https://px.a8.net/svt/ejp?a8mat=3H7MDC+20NGN6+49QG+5YJRM" rel="nofollow">this</a><img border="0" width="1" height="1" src="https://www11.a8.net/0.gif?a8mat=3H7MDC+20NGN6+49QG+5YJRM" alt="">.
markdown-it 渲染成这样:
<blockquote>
<p>Acronis True Image does not allow to clone a single partition; only cloning of an entire disk is possible
<a href="https://kb.acronis.com/content/56634">Acronis True Image: how to clone a disk | KNowledge Base</a></p>
</blockquote>
<p>But you can use <a href="https://px.a8.net/svt/ejp?a8mat=3H7MDC+20NGN6+49QG+5YJRM" rel="nofollow">this</a><img border="0" width="1" height="1" src="https://www11.a8.net/0.gif?a8mat=3H7MDC+20NGN6+49QG+5YJRM" alt="">.</p>
但实际上我想把它渲染成这样:
<blockquote>
<p>Acronis True Image does not allow to clone a single partition; only cloning of an entire disk is possible
<a href="https://kb.acronis.com/content/56634">Acronis True Image: how to clone a disk | KNowledge Base</a></p>
</blockquote>
<p>But you can use <a href="https://px.a8.net/svt/ejp?a8mat=3H7MDC+20NGN6+49QG+5YJRM" rel="nofollow">this</a><img border="0" width="1" height="1" src="https://www11.a8.net/0.gif?a8mat=3H7MDC+20NGN6+49QG+5YJRM" alt="">.</p>
我该怎么做?
解决方法
您需要启用 html
选项:
var md = require('markdown-it')({
html: true,});
作为 documented,html
在默认情况下是禁用的,这解释了它被转义的原因。
选项:
-
html -
false
。设置true
以启用源代码中的 HTML 标记。当心!那不安全!您可能需要外部消毒剂来保护 XSS 的输出。最好通过插件扩展功能,而不是 启用 HTML。