app/soc/logic/cleaning.py
changeset 2014 e6d297dcf7aa
parent 1990 fea8bdb43992
child 2029 1f276091b42a
equal deleted inserted replaced
2013:eda2589a90e6 2014:e6d297dcf7aa
   350       return content
   350       return content
   351 
   351 
   352     sanitizer = feedparser._HTMLSanitizer('utf-8')
   352     sanitizer = feedparser._HTMLSanitizer('utf-8')
   353     sanitizer.feed(content)
   353     sanitizer.feed(content)
   354     content = sanitizer.output()
   354     content = sanitizer.output()
       
   355     content = content.decode('utf-8')
   355     content = content.strip().replace('\r\n', '\n')
   356     content = content.strip().replace('\r\n', '\n')
   356 
   357 
   357     return content
   358     return content
   358 
   359 
   359   return wrapped
   360   return wrapped