[PLAT-5663] Escape spaces in toString, be tolerant of spaces mid-name/value