protect_curly function

Protect curly elements for further processing