Escapes the characters that break markup
Encoding converts the five characters that are meaningful in HTML — ampersand, angle brackets and both quotes — into & < > " ', which is exactly what you need to display code or user text safely.