13983 replace escaped chars

This commit is contained in:
Arthur 2023-12-12 13:20:57 -08:00
parent 5c0177049b
commit f509c65f3d

View File

@ -96,6 +96,8 @@ class CustomFieldChoiceSetImportForm(CSVModelForm):
for line in self.cleaned_data['extra_choices']:
try:
value, label = re.split(r'(?<!\\):', line, maxsplit=1)
value = value.replace('\\:', ':')
label = label.replace('\\:', ':')
except ValueError:
value, label = line, line
data.append((value, label))