提交 f2a53659 编写于 作者: M Matt Bierner

Switch to scheme blacklist for links in markedstring

Fixes #29751
上级 3d0a6647
......@@ -115,7 +115,7 @@ export function renderMarkdown(markdown: string, options: RenderOptions = {}): N
}
title = removeMarkdownEscapes(title);
href = removeMarkdownEscapes(href);
if (href && !href.match(/^http:|https:|file:|mailto:|command:/i)) {
if (!href || href.match(/^data:|javascript:/i)) {
return text;
}
return `<a href="#" data-href="${href}" title="${title || text}">${text}</a>`;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册