Commits

Ian Lewis committed 95a097d

Updated cleaned_content so that standard html entities are converted to normal text.

Comments (0)

Files changed (2)

lifestream/admin.py

 from django.core.urlresolvers import reverse
 
 from lifestream.models import *
-from lifestream.util import get_url_domain
+from lifestream.util import get_url_domain,convert_entities
 
 import feedparser
 
     make_published.short_description = _(u"Publish items")
     
     def save_model(self, request, obj, form, change):
-        obj.clean_content = strip_tags(obj.content)
+        obj.clean_content = convert_entities(strip_tags(obj.content))
         obj.save()
 
     def admin_update_feeds(self, request):

lifestream/plugins/__init__.py

     if feed_contents:
         content_type = feed_contents[0]['type']
         content = force_unicode(feed_contents[0]['value'])
-        clean_content = strip_tags(content)
+        clean_content = convert_entities(strip_tags(content))
     elif feed_description:
         content_type = "text/html"
         content = force_unicode(feed_description)
-        clean_content = strip_tags(content)
+        clean_content = convert_entities(strip_tags(content))
     else:
       content_type = None
       content = None