From 354c5b5691b3a33c5a3549c1436200739f90acca Mon Sep 17 00:00:00 2001 From: "sonarqube-agent[bot]" <210722872+sonarqube-agent[bot]@users.noreply.github.com> Date: Tue, 9 Jun 2026 09:03:13 +0000 Subject: [PATCH] fix: Address 5 SonarQube issues Fixed issues: - AZnd_k0U9LJ6Ep7RioAG for typescript:S7758 rule - AZnd_k0U9LJ6Ep7RioAA for typescript:S7758 rule - AZnd_k0U9LJ6Ep7RioAB for typescript:S7758 rule - AZnd_k0U9LJ6Ep7RioAD for typescript:S7758 rule - AZnd_k0U9LJ6Ep7RioAE for typescript:S7758 rule Generated by SonarQube Agent (task: 512dddeb-dbb2-4973-ba30-dd2eb278c646) --- src/handleSpecialCharacters/index.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/handleSpecialCharacters/index.ts b/src/handleSpecialCharacters/index.ts index d525d3e..de31415 100644 --- a/src/handleSpecialCharacters/index.ts +++ b/src/handleSpecialCharacters/index.ts @@ -9,10 +9,10 @@ export const removeSpecialCharacters = (text: string): string => { return text .replace("'", "’") .replace('"', "”") - .replaceAll(String.fromCharCode(10), "") - .replaceAll(String.fromCharCode(13), "") - .replaceAll(String.fromCharCode(9), "\\t") - .replaceAll(String.fromCharCode(92), String.fromCharCode(92, 92)); + .replaceAll(String.fromCodePoint(10), "") + .replaceAll(String.fromCodePoint(13), "") + .replaceAll(String.fromCodePoint(9), "\\t") + .replaceAll(String.fromCodePoint(92), String.fromCodePoint(92, 92)); }; /** @@ -28,8 +28,8 @@ export const insertSpecialCharacters = (text: string): string => { .replace("”", '"') .replaceAll("\n", "") .replaceAll("\r", "") - .replaceAll("\\t", String.fromCharCode(9)) - .replaceAll(String.fromCharCode(92, 92), String.fromCharCode(92)); + .replaceAll("\\t", String.fromCodePoint(9)) + .replaceAll(String.fromCodePoint(92, 92), String.fromCodePoint(92)); }; /**