From 5ed7d106f43c60d019be7dd11c2cbdf679b0635e Mon Sep 17 00:00:00 2001
From: Aung Htet Nay <57069407+aunghtetnay@users.noreply.github.com>
Date: Wed, 8 Oct 2025 13:55:53 +0630
Subject: [PATCH] Potential fix for code scanning alert no. 4: Double escaping
or unescaping
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
---
src/utils/helper/socialLink.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/utils/helper/socialLink.ts b/src/utils/helper/socialLink.ts
index 5b4de86..ed37003 100644
--- a/src/utils/helper/socialLink.ts
+++ b/src/utils/helper/socialLink.ts
@@ -51,9 +51,9 @@ export const cleanText = (htmlString: string): string => {
.replace(/ /gi, " ")
.replace(/</gi, "<")
.replace(/>/gi, ">")
- .replace(/&/gi, "&")
.replace(/"/gi, '"')
.replace(/'/gi, "'")
+ .replace(/&/gi, "&")
.replace(/
(\s*
)*/gi, "\n")
.replace(/<\/?p>/gi, " ")
.replace(/<\/?[^>]+(>|$)/g, "")