Subscribe Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security. Subscribe

API endpoint get_cases() returns invalid json from copy&paste text

Thru GUI pasted text to a separate step Expected Results field which contained a hidden \xa0 from an Microsoft usage on original source.

Example: “Verify\xa0 the foo bar” Where the \xa0 is not seen in the source or shows up after saving in the TR GUI.

But a get_cases() api call returns text as above:

  • “Verify\xa0 the foo bar”

Should be:

  • “Verify\\xa0 the foo bar”

Adding manually \xa0 to the same field and the API returns the correct value with the \x quoted.

GUI should handle this so the API does not return invalid json.

Not unexpectedly the offending char is a non-breaking space in Latin1 (ISO 8859-1) since I have to read the input with this encoding set.

The original is coming from an CSV export of the Testlog test case mgmt. tool.

Hexdump:
$ hexdump -Cc testlog.md
00000000 56 65 72 69 66 79 c2 a0 74 68 65 0a |Verify…the.|
0000000 V e r i f y � � t h e \n