UI expands some escaped characters from JSON, then fails to encode them again