Parcourir la source

Strip return characters when removing line breaks

Jeremy Stretch il y a 7 ans
Parent
commit
14695037da
1 fichiers modifiés avec 1 ajouts et 0 suppressions
  1. 1 0
      netbox/utilities/templatetags/helpers.py

+ 1 - 0
netbox/utilities/templatetags/helpers.py

@@ -22,6 +22,7 @@ def oneline(value):
     """
     Replace each line break with a single space
     """
+    value = value.replace('\r', '')
     return value.replace('\n', ' ')