diff --git a/src/components/message/message-card/raw/SimpleMessageRaw.tsx b/src/components/message/message-card/raw/SimpleMessageRaw.tsx index 60f64fae..2e938f8b 100644 --- a/src/components/message/message-card/raw/SimpleMessageRaw.tsx +++ b/src/components/message/message-card/raw/SimpleMessageRaw.tsx @@ -24,7 +24,7 @@ interface Props { export default function SimpleMessageRaw({ rawContent }: Props) { const contentRef = React.useRef(null); - const humanReadableContent = decodeURIComponent(atob(rawContent)); + const humanReadableContent = decodeURIComponent(encodeURIComponent(atob(rawContent))); const convertedArr = splitOnReadableParts(humanReadableContent); return ( diff --git a/src/helpers/rawFormatter.ts b/src/helpers/rawFormatter.ts index 6e2fbf77..8beadfec 100644 --- a/src/helpers/rawFormatter.ts +++ b/src/helpers/rawFormatter.ts @@ -68,7 +68,9 @@ export function decodeBase64RawContent(rawBase64Content: string): string[][] { const offset = []; const hexadecimal = []; const humanReadable = []; - const raw = Uint16Array.from(decodeURIComponent(atob(rawBase64Content)), c => c.charCodeAt(0)); + const raw = Uint16Array.from(decodeURIComponent(encodeURIComponent(atob(rawBase64Content))), c => + c.charCodeAt(0), + ); let index = 0; const { length } = raw; while (index < length) {