equal
deleted
inserted
replaced
40 from logging import getLogger |
40 from logging import getLogger |
41 |
41 |
42 from six import text_type |
42 from six import text_type |
43 |
43 |
44 from logilab.mtconverter import xml_escape |
44 from logilab.mtconverter import xml_escape |
45 from logilab.common.deprecation import deprecated |
|
46 from logilab.common.date import ustrftime |
45 from logilab.common.date import ustrftime |
47 |
46 |
48 from cubicweb import Binary |
47 from cubicweb import Binary |
49 |
48 |
50 |
49 |
440 self.doctype = u'' |
439 self.doctype = u'' |
441 self._htmlattrs = [('lang', req.lang)] |
440 self._htmlattrs = [('lang', req.lang)] |
442 # keep main_stream's reference on req for easier text/html demoting |
441 # keep main_stream's reference on req for easier text/html demoting |
443 req.main_stream = self |
442 req.main_stream = self |
444 |
443 |
445 @deprecated('[3.17] there are no namespaces in html, xhtml is not served any longer') |
|
446 def add_namespace(self, prefix, uri): |
|
447 pass |
|
448 |
|
449 @deprecated('[3.17] there are no namespaces in html, xhtml is not served any longer') |
|
450 def set_namespaces(self, namespaces): |
|
451 pass |
|
452 |
|
453 def add_htmlattr(self, attrname, attrvalue): |
444 def add_htmlattr(self, attrname, attrvalue): |
454 self._htmlattrs.append( (attrname, attrvalue) ) |
445 self._htmlattrs.append( (attrname, attrvalue) ) |
455 |
446 |
456 def set_htmlattrs(self, attrs): |
447 def set_htmlattrs(self, attrs): |
457 self._htmlattrs = attrs |
448 self._htmlattrs = attrs |