fix: remove link url escaping

This commit is contained in:
Yanlong Wang 2024-10-18 12:59:36 +08:00
parent a54816d12d
commit 74eac2fc18
No known key found for this signature in database
GPG Key ID: C0A623C0BADF9F37

View File

@ -510,8 +510,7 @@ ${suffixMixins.length ? `\n${suffixMixins.join('\n\n')}\n` : ''}`;
},
replacement: function (content, node: any) {
let href = node.getAttribute('href');
if (href) href = href.replace(/([()])/g, '\\$1');
const href = node.getAttribute('href');
let title = cleanAttribute(node.getAttribute('title'));
if (title) title = ' "' + title.replace(/"/g, '\\"') + '"';