Skip to content

Commit

Permalink
removed deprecated escape in decoding of rawContent (#570)
Browse files Browse the repository at this point in the history
* removed deprecated escape in decoding of rawContent

* encodeURI for cases when it was not alreay done
  • Loading branch information
molotgor authored Apr 25, 2024
1 parent 2f0c4c9 commit 439f2fa
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 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(encodeURIComponent(atob(rawContent)));
const convertedArr = splitOnReadableParts(humanReadableContent);

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

0 comments on commit 439f2fa

Please sign in to comment.