Improve escaping in code response.

WIP:
Improve escaping in code response.