Use same code for initializing CC comments editor as for builtin comments editor

This commit is contained in:
Kovid Goyal 2013-10-16 11:19:38 +05:30
parent c58e7eb2e8
commit f11ab7d0c3

View File

@ -234,9 +234,12 @@ class Comments(Base):
self.widgets = [self._box] self.widgets = [self._box]
def setter(self, val): def setter(self, val):
if val is None: if not val or not val.strip():
val = '' val = ''
self._tb.html = comments_to_html(val) else:
val = comments_to_html(val)
self._tb.html = val
self._tb.wyswyg_dirtied()
def getter(self): def getter(self):
val = unicode(self._tb.html).strip() val = unicode(self._tb.html).strip()