escape backslashes before braces

also escape backslashes in setting