Skip to content

Commit

Permalink
removed deprecated escape in decoding of rawContent
Browse files Browse the repository at this point in the history
  • Loading branch information
molotgor committed Apr 23, 2024
1 parent 2f0c4c9 commit 0835687
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "th2-rpt-viewer",
"version": "5.2.6",
"version": "5.2.7",
"description": "",
"main": "index.tsx",
"private": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ interface Props {
export default function SimpleMessageRaw({ rawContent }: Props) {
const contentRef = React.useRef<HTMLDivElement>(null);

const humanReadableContent = decodeURIComponent(escape(atob(rawContent)));
const humanReadableContent = decodeURIComponent(atob(rawContent));
const convertedArr = splitOnReadableParts(humanReadableContent);

return (
Expand Down
4 changes: 1 addition & 3 deletions src/helpers/rawFormatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,7 @@ export function decodeBase64RawContent(rawBase64Content: string): string[][] {
const offset = [];
const hexadecimal = [];
const humanReadable = [];
const raw = Uint16Array.from(decodeURIComponent(escape(atob(rawBase64Content))), c =>
c.charCodeAt(0),
);
const raw = Uint16Array.from(decodeURIComponent(atob(rawBase64Content)), c => c.charCodeAt(0));
let index = 0;
const { length } = raw;
while (index < length) {
Expand Down

0 comments on commit 0835687

Please sign in to comment.