add template to escape backslashes