Telling Zope/Chameleon to not parse a section?
I have a Pyramid app that uses Chameleon. I need to declare some attributes in my DOCTYPE, like so:
<!DOCTYPE public 开发者_运维知识库html .........
[
<!ATTLIST tag attributes CDATA #IMPLIED>
]>
When I add this to my template, id doesn't get rendered properly and my browser draws "]>".
When I remove the ATTLIST and only do<!DOCTYPE public html .........>
, everything works.
How can I tell Chameleon to not parse the ATTLIST section and copy it as is?
That has absolutely nothing to do with Chameleon. If I paste that code into a file and open it in my browser, I see ]>
as well.
Edit: I figured it out. Rename the file to .xhtml
and it will work (at least for me).
If you're receiving it over the network, having the content-type
set to application/xhtml+xml
would work the same way.
精彩评论