Skip to content

Commit 7cf9dbe

Browse files
committed
Fix escaping of raw values that contain & in md preview
Fixes microsoft#236660
1 parent e5f9272 commit 7cf9dbe

File tree

1 file changed

+4
-1
lines changed
  • extensions/markdown-language-features/src/util

1 file changed

+4
-1
lines changed

extensions/markdown-language-features/src/util/dom.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55
import * as vscode from 'vscode';
66

77
export function escapeAttribute(value: string | vscode.Uri): string {
8-
return value.toString().replace(/"/g, '"');
8+
return value.toString()
9+
.replace(/&/g, '&')
10+
.replace(/"/g, '"')
11+
.replace(/'/g, ''');
912
}
1013

1114
export function getNonce() {

0 commit comments

Comments
 (0)