Escape unsafe strings before decoding byte[], and added a test that otherwise fails.