fix dc_description format arg stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 20 May 2009 14:19:48 +0200
branchstable
changeset 1881 75540944ae18
parent 1880 293fe4b49e28
child 1882 ce662160bb46
fix dc_description format arg
web/views/calendar.py
web/views/timeline.py
--- a/web/views/calendar.py	Wed May 20 14:19:02 2009 +0200
+++ b/web/views/calendar.py	Wed May 20 14:19:48 2009 +0200
@@ -4,6 +4,8 @@
 :copyright: 2001-2009 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
 :contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
 """
+__docformat__ = "restructuredtext en"
+_ = unicode
 
 from datetime import datetime, date, timedelta
 
@@ -14,7 +16,6 @@
 from cubicweb.utils import strptime, date_range, todate, todatetime
 from cubicweb.view import EntityView
 
-_ = unicode
 
 # useful constants & functions ################################################
 
@@ -81,7 +82,8 @@
             task = self.complete_entity(i)
             self.w(u'<div class="vevent">')
             self.w(u'<h3 class="summary">%s</h3>' % html_escape(task.dc_title()))
-            self.w(u'<div class="description">%s</div>' % html_escape(task.dc_description()))
+            self.w(u'<div class="description">%s</div>'
+                   % task.dc_description(format='text/html'))
             if task.start:
                 self.w(u'<abbr class="dtstart" title="%s">%s</abbr>' % (task.start.isoformat(), self.format_date(task.start)))
             if task.stop:
--- a/web/views/timeline.py	Wed May 20 14:19:02 2009 +0200
+++ b/web/views/timeline.py	Wed May 20 14:19:48 2009 +0200
@@ -67,7 +67,7 @@
             return None
         event_data = {'start': start.strftime(self.date_fmt),
                       'title': html_escape(entity.dc_title()),
-                      'description': entity.dc_description(),
+                      'description': entity.dc_description(format='text/html'),
                       'link': entity.absolute_url(),
                       }
         onclick = self.onclick(entity)