Пример #1
0
 def clean_offering(self):
     offering = self.cleaned_data.get("offering", None)
     if offering:
         if not offering.endswith('\n'):
             offering += '\n'
         offering_stripped = force_unicode(sanitize_html(offering))
         offering = offering_stripped.replace('\r\n', '\n')
     return offering
Пример #2
0
 def clean_offering(self):
     offering = self.cleaned_data.get("offering", None)
     if offering:
         if not offering.endswith('\n'):
             offering += '\n'
         offering_stripped = force_unicode(sanitize_html(offering))
         offering = offering_stripped.replace('\r\n', '\n')
     return offering
Пример #3
0
 def clean_description(self):
     description = self.cleaned_data.get("description", None)
     if description:
         if not description.endswith("\n"):
             description += "\n"
         description_stripped = force_unicode(sanitize_html(description))
         description = description_stripped.replace("\r\n", "\n")
     return description
Пример #4
0
 def clean_description(self):
     description = self.cleaned_data.get("description", None)
     if description:
         if not description.endswith('\n'):
             description += '\n'
         description_stripped = force_unicode(
             sanitize_html(description))
         description = description_stripped.replace('\r\n', '\n')
     return description