Added function to escape curly brackets