mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Added fix to regex for string escape (#23421)
* added fix to escape switch * added fix to regex
This commit is contained in:
@@ -8,7 +8,7 @@
|
|||||||
* being used e.g. in HTMLElement.innerHTML.
|
* being used e.g. in HTMLElement.innerHTML.
|
||||||
*/
|
*/
|
||||||
export function escape(html: string): string {
|
export function escape(html: string): string {
|
||||||
return html.replace(/[<|>|&|"]/g, function (match) {
|
return html.replace(/[<|>|&|"|\']/g, function (match) {
|
||||||
switch (match) {
|
switch (match) {
|
||||||
case '<': return '<';
|
case '<': return '<';
|
||||||
case '>': return '>';
|
case '>': return '>';
|
||||||
|
|||||||
Reference in New Issue
Block a user