Commits

megamahi committed 7ae0bec

Fixed bad regex not getting rid of trailing <br /> tags.

Comments (0)

Files changed (1)

tw2/tinymce/base.py

     def __init__(self, **kw):
         UnicodeString.__init__(self, **kw)
 
-    cleaner = re.compile(r'(\s*<br />\s*)+$').sub
+    cleaner = re.compile(r'(\s*<br[ ]{0,1}/>\s*)+$').sub
     if_missing=''
     def _to_python(self, value, state=None):
         value = super(MarkupConverter, self)._to_python(value, state)