Version Upload API: Handle \n for release notes #262
@ -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')
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user