Show
Ignore:
Timestamp:
09/16/08 13:31:56 (18 months ago)
Author:
JensDiemer
Message:
  • add a pass-through for normal django tags (not blocktags)
  • Move creole markup above
  • Update creole markup help and unittests
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/pylucid_project/PyLucid/system/markups/creole2html.py

    r1766 r1769  
    5858        print node 
    5959 
    60  
     60from PyLucid.tools.utils import escape 
    6161class HtmlEmitter: 
    6262    """ 
     
    8282 
    8383    def html_escape(self, text): 
    84         return text.replace('&', '&amp;').replace('<', '&lt;').replace('>', '&gt;') 
     84        return escape(text) 
     85        #return text.replace('&', '&amp;').replace('<', '&lt;').replace('>', '&gt;') 
    8586 
    8687    def attr_escape(self, text): 
     
    205206        return u"<pre>\n%s\n</pre>\n" % self.html_escape(node.content) 
    206207 
    207     def passthrough_emit(self, node): 
     208    def passthrough_block_emit(self, node): 
    208209        """ Pass-through all django template blocktags and html code lines """ 
    209210        return node.content + "\n" 
    210     html_emit = passthrough_emit 
     211    html_emit = passthrough_block_emit 
     212 
     213    def passthrough_line_emit(self, node): 
     214        """ Pass-through all django template tags """ 
     215        return node.content 
    211216 
    212217    def default_emit(self, node):