Escape special characters when saving YAML files.