fix: for code scanning alert no. 10: Double escaping or unescaping (#3283)

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
This commit is contained in:
GeoandCopilot Autofix powered by AI authored and GitHub committed 2025-10-21 22:38:55 +01:00
1 parent 8b7392b56d
commit 2e6abec624
1 file changed
+2 -2
@@ -14,9 +14,9 @@ export const Icon = ({svg, attributes}) => {
.replace(/\\u0026/gi, "&")
.replace(/&lt;/gi, "<")
.replace(/&gt;/gi, ">")
.replace(/&amp;/gi, "&")
.replace(/&quot;/gi, '"')
.replace(/&#34;/gi, '"');
.replace(/&#34;/gi, '"')
.replace(/&amp;/gi, "&");
const hasWrapper = /<svg[\s>]/i.test(decoded);