mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 06:39:48 +00:00
Charcode for webview (Fixes #1045)
This commit is contained in:
parent
794646f2ac
commit
d5bc716918
@ -286,13 +286,12 @@ class ResponseViewer extends React.Component<Props, State> {
|
||||
</div>
|
||||
);
|
||||
} else if (previewMode === PREVIEW_MODE_FRIENDLY && ct.includes('html')) {
|
||||
const justContentType = contentType.split(';')[0];
|
||||
const match = contentType.match(/charset=([\w-]+)/);
|
||||
const charset = match && match.length >= 2 ? match[1] : 'utf-8';
|
||||
return (
|
||||
<ResponseWebView
|
||||
body={this._decodeIconv(bodyBuffer, charset)}
|
||||
contentType={justContentType}
|
||||
contentType={contentType}
|
||||
url={url}
|
||||
/>
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user