Added function to use htmlspecialchars method