Skip to content

Commit

Permalink
Merge pull request #236747 from mjbvz/above-asp
Browse files Browse the repository at this point in the history
Fix escaping of raw values that contain `&` in md preview
  • Loading branch information
mjbvz authored Dec 20, 2024
2 parents b9f07f1 + 7cf9dbe commit f092379
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion extensions/markdown-language-features/src/util/dom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit f092379

Please sign in to comment.