Escape < and > to avoid turning them into html tags and prevent xss

Escape < and > to avoid turning them into html tags.
This prevents XSS when you are reconstructing data from the server.