restored htmlspecialchars function