Escape newlines in templates for readability