uilib.py
changeset 10012 8c2c6fdd8d56
parent 9921 8227358aa983
child 10332 da1cb2b12fe1
equal deleted inserted replaced
10011:340d4ef55b6f 10012:8c2c6fdd8d56
   161                      propname, propvalue)
   161                      propname, propvalue)
   162     return default
   162     return default
   163 
   163 
   164 # text publishing #############################################################
   164 # text publishing #############################################################
   165 
   165 
       
   166 from cubicweb.ext.markdown import markdown_publish # pylint: disable=W0611
       
   167 
   166 try:
   168 try:
   167     from cubicweb.ext.rest import rest_publish # pylint: disable=W0611
   169     from cubicweb.ext.rest import rest_publish # pylint: disable=W0611
   168 except ImportError:
   170 except ImportError:
   169     def rest_publish(entity, data):
   171     def rest_publish(entity, data):
   170         """default behaviour if docutils was not found"""
   172         """default behaviour if docutils was not found"""
   171         return xml_escape(data)
   173         return xml_escape(data)
       
   174 
   172 
   175 
   173 TAG_PROG = re.compile(r'</?.*?>', re.U)
   176 TAG_PROG = re.compile(r'</?.*?>', re.U)
   174 def remove_html_tags(text):
   177 def remove_html_tags(text):
   175     """Removes HTML tags from text
   178     """Removes HTML tags from text
   176 
   179