MDL-44061 Javascript: Allow some whitespace in captured output

The JSON specification does allow certain whitespace character in JSON
output:
* [space]
* \t [tab]
* \n [new line/line feed]
* \r [carriage return]

Do not complain about these specific characters through when testing
captured output.