#1918: genshi.outputformat="xhtml" is ignored
-------------------------+--------------------------------------------------
 Reporter:  ondrejj      |        Owner:  anonymous
     Type:  enhancement  |       Status:  new      
 Priority:  normal       |    Milestone:  1.9.7b1  
Component:  TurboGears   |      Version:  trunk    
 Severity:  normal       |   Resolution:           
 Keywords:               |  
-------------------------+--------------------------------------------------
Comment (by ondrejj):

 I can't find, where "HTML" (non XHTML) is set. I see only, that in
 setup_genshi_renderer is used this:
 {{{
 from tg.render import render_genshi
 }}}
 And in tg.render:
 {{{
 def render_genshi(template_name, template_vars, **kwargs):
     """Render a the template_vars with the Genshi template"""
     template_vars['XML'] = XML
     return templating.render_genshi(template_name,
 extra_vars=template_vars, **kwargs)
 }}}
 And finally in pylons.templating:
 {{{
 def render_genshi(template_name, extra_vars=None, cache_key=None,
              cache_type=None, cache_expire=None, method='xhtml'):

 }}}
 But here is set method to xhtml, so why this does not work? Why my pages
 are encoded to HTML?

 Also this code has no effect (config/app_cfg.py):
 {{{
 from pylons import templating
 from genshi import XML

 def render_genshi_sal(template_name, template_vars, **kwargs):
     """Render a the template_vars with the Genshi template"""
     template_vars['XML'] = XML
     return templating.render_genshi(template_name,
 extra_vars=template_vars,
                                     method='xhtml-strict',
                                     **kwargs)

 class AppConfig_updated(AppConfig):
   def setup_genshi_renderer(self):
       super(AppConfig_updated, self).setup_genshi_renderer()
       self.render_functions.genshi = render_genshi_sal

 base_config = AppConfig_updated()
 base_config.renderers = []
 base_config.default_renderer = 'genshi'
 base_config.renderers.append('genshi')
 }}}

 Can you help me, what's wrong?

-- 
Ticket URL: <http://trac.turbogears.org/ticket/1918#comment:5>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "TurboGears Tickets" group.
This group is read-only. No posting by normal members allowed.
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears-tickets?hl=en?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to