Hi, what you think abaut chage the actual include_meta() implemetation:
def include_meta(self):
s = '\n'.join(
'<meta name="%s" content="%s" />\n' % (k, xmlescape(v))
for k, v in (self.meta or {}).iteritems())
self.write(s, escape=False)
by something like:
def include_meta(self):
s = "\n";
for meta in (self.meta or {}).iteritems():
k,v = meta
if isinstance(v,dict):
s = s+'<meta'+''.join(' %s="%s"' % (xmlescape(key),
xmlescape(v[key])) for key in v) +' />\n'
else:
s = s+'<meta name="%s" content="%s" />\n' % (k, xmlescape(v))
self.write(s, escape=False)
It will give a more flexible META generation using dicts, without
breaking backward compatibility.
response.meta.generator = 'Web2py Web Framework'
response.meta.og_type = dict(property="og:type", content="website")
will render:
<meta name="generator" content="Web2py Web Framework" />
<meta content="website" property="og:type" />
--
Nunca digas nunca, di mejor: gracias, permiso, disculpe.
Este mensaje le ha llegado mediante el servicio de correo electronico que
ofrece Infomed para respaldar el cumplimiento de las misiones del Sistema
Nacional de Salud. La persona que envia este correo asume el compromiso de usar
el servicio a tales fines y cumplir con las regulaciones establecidas
Infomed: http://www.sld.cu/
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups "web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.