From f36ed0bb02c5f10dab1ec0ecf861b939c1f81bc1 Mon Sep 17 00:00:00 2001 From: Alex Ma Date: Mon, 19 Jun 2023 17:36:34 -0700 Subject: [PATCH] Added fix to regex for string escape (#23421) * added fix to escape switch * added fix to regex --- src/sql/base/common/strings.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sql/base/common/strings.ts b/src/sql/base/common/strings.ts index 6c61fe9b14..a8f84797e5 100644 --- a/src/sql/base/common/strings.ts +++ b/src/sql/base/common/strings.ts @@ -8,7 +8,7 @@ * being used e.g. in HTMLElement.innerHTML. */ export function escape(html: string): string { - return html.replace(/[<|>|&|"]/g, function (match) { + return html.replace(/[<|>|&|"|\']/g, function (match) { switch (match) { case '<': return '<'; case '>': return '>';