I have been using html purify to purify the user data (https://github.com/mewebstudio/Purifier), It works well but when user insert curly braces, every thing blows up. So how to escape curly braces in this packages ?
I think you may be out of luck. I don't think that package or stevebauman/purify only takes care of HTML related markup. So, I would just create a helper function that converts the curly braces before running the string through the purifier.