mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-19 15:21:23 +02:00
Adjusting the JSON viewing response to accept accentuation (#203)
This commit is contained in:
committed by
GitHub
parent
a05679fd93
commit
763a60982a
@@ -116,11 +116,14 @@ export function TextViewer({ language, text, responseId, requestId, pretty, clas
|
|||||||
body = formattedBody.data;
|
body = formattedBody.data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Decode unicode sequences in the text to readable characters
|
||||||
|
const decodedBodyText = unescape(body.replace(/\\u/g, '%u')) || body;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Editor
|
<Editor
|
||||||
readOnly
|
readOnly
|
||||||
className={className}
|
className={className}
|
||||||
defaultValue={body}
|
defaultValue={decodedBodyText}
|
||||||
language={language}
|
language={language}
|
||||||
actions={actions}
|
actions={actions}
|
||||||
extraExtensions={extraExtensions}
|
extraExtensions={extraExtensions}
|
||||||
@@ -128,3 +131,4 @@ export function TextViewer({ language, text, responseId, requestId, pretty, clas
|
|||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user