Skip to content

Commit

Permalink
Escape and wrap output from sample request response
Browse files Browse the repository at this point in the history
  • Loading branch information
sldab committed Dec 19, 2015
1 parent beb57ab commit 93ba6eb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions template/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,12 @@ pre code {
white-space: pre;
}

pre code.sample-request-response-json {
white-space: pre-wrap;
max-height: 300px;
overflow: scroll;
}

/*
pre.language-json {
background: #f5f5f5;
Expand Down
2 changes: 1 addition & 1 deletion template/utils/send_sample_request.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ define([
jsonResponse = JSON.parse(jqXHR.responseText);
jsonResponse = JSON.stringify(jsonResponse, null, 4);
} catch (e) {
jsonResponse = jqXHR.responseText;
jsonResponse = escape(jqXHR.responseText);
}

if (jsonResponse)
Expand Down

0 comments on commit 93ba6eb

Please sign in to comment.