Adjusting the JSON viewing response to accept accentuation (#203)

This commit is contained in:
Walyson G Oliveira
2025-05-16 16:37:00 -03:00
committed by GitHub
parent a05679fd93
commit 763a60982a

View File

@@ -116,11 +116,14 @@ export function TextViewer({ language, text, responseId, requestId, pretty, clas
body = formattedBody.data;
}
// Decode unicode sequences in the text to readable characters
const decodedBodyText = unescape(body.replace(/\\u/g, '%u')) || body;
return (
<Editor
readOnly
className={className}
defaultValue={body}
defaultValue={decodedBodyText}
language={language}
actions={actions}
extraExtensions={extraExtensions}
@@ -128,3 +131,4 @@ export function TextViewer({ language, text, responseId, requestId, pretty, clas
/>
);
}