diff options
| author | stonedDiscord <Tukz@gmx.de> | 2023-01-08 20:37:36 +0100 |
|---|---|---|
| committer | stonedDiscord <Tukz@gmx.de> | 2023-01-08 20:37:36 +0100 |
| commit | 3cf9a4e0744dbf14dc1dd17d33d9f58478995b2b (patch) | |
| tree | 7523eea0e05d70e6a7d60b577ea0338e39e662a0 | |
| parent | 8c7b3aa3728853b0eeec11bac66d7ffdd961775d (diff) | |
replace all occurences
| -rw-r--r-- | webAO/encoding.ts | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/webAO/encoding.ts b/webAO/encoding.ts index 2d1f66f..5e53340 100644 --- a/webAO/encoding.ts +++ b/webAO/encoding.ts @@ -4,10 +4,10 @@ */ export function escapeChat(estring: string): string { return estring - .replace('#', '<num>') - .replace('&', '<and>') - .replace('%', '<percent>') - .replace('$', '<dollar>'); + .replaceAll('#', '<num>') + .replaceAll('&', '<and>') + .replaceAll('%', '<percent>') + .replaceAll('$', '<dollar>'); } /** @@ -16,10 +16,10 @@ export function escapeChat(estring: string): string { */ export function unescapeChat(estring: string): string { return estring - .replace('<num>', '#') - .replace('<and>', '&') - .replace('<percent>', '%') - .replace('<dollar>', '$'); + .replaceAll('<num>', '#') + .replaceAll('<and>', '&') + .replaceAll('<percent>', '%') + .replaceAll('<dollar>', '$'); } /** |
