Skip to content

Commit 27f4ec6

Browse files
authored
chore: fix backtick quote escaping (#36997)
1 parent 0c813da commit 27f4ec6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/playwright-core/src/utils/isomorphic/stringUtils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export function escapeWithQuotes(text: string, char: string = '\'') {
2323
if (char === '"')
2424
return char + escapedText.replace(/["]/g, '\\"') + char;
2525
if (char === '`')
26-
return char + escapedText.replace(/[`]/g, '`') + char;
26+
return char + escapedText.replace(/[`]/g, '\\`') + char;
2727
throw new Error('Invalid escape char');
2828
}
2929

0 commit comments

Comments
 (0)