diff --git a/packages/react/src/components/LoadedCode.tsx b/packages/react/src/components/LoadedCode.tsx index 95b3c1d..9c17942 100644 --- a/packages/react/src/components/LoadedCode.tsx +++ b/packages/react/src/components/LoadedCode.tsx @@ -2,7 +2,6 @@ import { useRef, useEffect, useState, forwardRef } from "react"; import hljs from "highlight.js"; import { Button } from "@components/Button"; import { useToast } from "@components/Toast"; -import { escapeHtml } from "@/utils/escapeHtml"; export const GITHUB = "https://raw.githubusercontent.com/p-sw/ui/main"; @@ -15,7 +14,7 @@ export const LoadedCode = forwardRef( (async () => { const res = await fetch(from); const text = await res.text(); - setState(escapeHtml(text)); + setState(text); })(); }, [from]); diff --git a/packages/react/src/utils/escapeHtml.ts b/packages/react/src/utils/escapeHtml.ts deleted file mode 100644 index 953ed66..0000000 --- a/packages/react/src/utils/escapeHtml.ts +++ /dev/null @@ -1,3 +0,0 @@ -export const escapeHtml = (unsafe: string) => { - return unsafe.replaceAll('&', '&').replaceAll('<', '<').replaceAll('>', '>').replaceAll('"', '"').replaceAll("'", '''); -}