Added HTML encoding during conversions to ensure the output is displayed properly on the web.