Replacing lower/greater than signs with escaped values