Version Upload API: Handle \n for release notes #262

Merged
Dalai Felinto merged 2 commits from version-update-linebreak into main 2024-10-10 18:58:14 +02:00
Showing only changes of commit 399f412e54 - Show all commits

View File

@ -174,8 +174,8 @@ class ExtensionVersionSerializer(serializers.Serializer):
def validate_release_notes(self, value): def validate_release_notes(self, value):
r"""Make sure \n and \r are valid after sanitation.""" r"""Make sure \n and \r are valid after sanitation."""
if not value: if value is None:
return value return
return value.replace('\\n', '\n').replace('\\r', '\r') return value.replace('\\n', '\n').replace('\\r', '\r')