fix: handling of the backslash character

Escape the backslash character when this is present in a template