Fix escaping of raw values that contain `&` in md preview

Fixes #236660
pull/236747/head
Matt Bierner 2024-12-20 10:52:07 -08:00
parent e5f9272019
commit 7cf9dbecf6
1 changed files with 4 additions and 1 deletions

View File

@ -5,7 +5,10 @@
import * as vscode from 'vscode';
export function escapeAttribute(value: string | vscode.Uri): string {
return value.toString().replace(/"/g, '"');
return value.toString()
.replace(/&/g, '&')
.replace(/"/g, '"')
.replace(/'/g, ''');
}
export function getNonce() {