Added escapeHTML function