fix email else condition (#16491)

This commit is contained in:
Vasu Bhog
2021-07-29 18:37:06 -07:00
committed by GitHub
parent aafe0876bb
commit 788c84a1ee

View File

@@ -138,12 +138,11 @@ export class NotebookMarkdownRenderer {
// mailto uris do not need additional encoding of &, otherwise it would not render properly
if (uri.scheme !== 'mailto') {
href = href.replace(/&(?!amp;)/g, '&');
} else {
href = href.replace(/</g, '&lt;')
.replace(/>/g, '&gt;')
.replace(/"/g, '&quot;')
.replace(/'/g, '&#39;');
}
href = href.replace(/</g, '&lt;')
.replace(/>/g, '&gt;')
.replace(/"/g, '&quot;')
.replace(/'/g, '&#39;');
return `<a href=${href} data-href="${href}" title="${title || href}">${text}</a>`;
}
};