regex to encode & correctly (#8441)

This commit is contained in:
Maddy
2019-11-22 17:20:41 -08:00
committed by GitHub
parent f0039a64a7
commit 66e1c01793

View File

@@ -5,7 +5,6 @@
import * as path from 'vs/base/common/path';
import { URI } from 'vs/base/common/uri';
import { IMarkdownString, removeMarkdownEscapes } from 'vs/base/common/htmlContent';
import { IMarkdownRenderResult } from 'vs/editor/contrib/markdown/markdownRenderer';
import * as marked from 'vs/base/common/marked/marked';
@@ -128,7 +127,7 @@ export class NotebookMarkdownRenderer {
} else {
// HTML Encode href
href = href.replace(/&/g, '&')
href = href.replace(/&(?!amp;)/g, '&')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;')
.replace(/"/g, '&quot;')