ext/html4zope.py
branchstable
changeset 2312 af4d8f75c5db
parent 1977 606923dff11b
child 4212 ab6573088b4a
equal deleted inserted replaced
2311:f178182b1305 2312:af4d8f75c5db
    22 http://cvs.zope.org/Zope/lib/python/docutils/writers/Attic/html4zope.py?rev=1.1.2.2&only_with_tag=ajung-restructuredtext-integration-branch&content-type=text/vnd.viewcvs-markup
    22 http://cvs.zope.org/Zope/lib/python/docutils/writers/Attic/html4zope.py?rev=1.1.2.2&only_with_tag=ajung-restructuredtext-integration-branch&content-type=text/vnd.viewcvs-markup
    23 """
    23 """
    24 
    24 
    25 __docformat__ = 'reStructuredText'
    25 __docformat__ = 'reStructuredText'
    26 
    26 
    27 from logilab.mtconverter import html_escape
    27 from logilab.mtconverter import xml_escape
    28 
    28 
    29 from docutils import nodes
    29 from docutils import nodes
    30 from docutils.writers.html4css1 import Writer as CSS1Writer
    30 from docutils.writers.html4css1 import Writer as CSS1Writer
    31 from docutils.writers.html4css1 import HTMLTranslator as CSS1HTMLTranslator
    31 from docutils.writers.html4css1 import HTMLTranslator as CSS1HTMLTranslator
    32 import os
    32 import os
   152             line = ''
   152             line = ''
   153         a_start = a_end = ''
   153         a_start = a_end = ''
   154         error = u'System Message: %s%s/%s%s (%s %s)%s</p>\n' % (
   154         error = u'System Message: %s%s/%s%s (%s %s)%s</p>\n' % (
   155             a_start, node['type'], node['level'], a_end,
   155             a_start, node['type'], node['level'], a_end,
   156             self.encode(node['source']), line, backref_text)
   156             self.encode(node['source']), line, backref_text)
   157         self.body.append(u'<div class="system-message"><b>ReST / HTML errors:</b>%s</div>' % html_escape(error))
   157         self.body.append(u'<div class="system-message"><b>ReST / HTML errors:</b>%s</div>' % xml_escape(error))
   158 
   158 
   159     def depart_system_message(self, node):
   159     def depart_system_message(self, node):
   160         pass
   160         pass