Added escapeHtml function