Safely encode HTML special characters into their entity equivalents to display code safely on web pages.