Step 1 towards fixing bug#15.
Fixed the text test.
Improved validation of JSON 'text' fields.