Hi

The attached patch to Templator allows templates to be read from .xhtml files 
and output with the correct Content-Type for XHTML.

Michael

-- 
http://michael.gorven.za.net
PGP Key ID 6612FE85
S/MIME Key ID 91E03AF1
diff --git a/web/template.py b/web/template.py
index 70b3872..74a9663 100644
--- a/web/template.py
+++ b/web/template.py
@@ -801,10 +801,12 @@ class BaseTemplate:
 class Template(BaseTemplate):
     CONTENT_TYPES = {
         '.html' : 'text/html; charset=utf-8',
+		'.xhtml' : 'application/xhtml+xml; charset=utf-8',
         '.txt' : 'text/plain',
     }
     FILTERS = {
         '.html': websafe,
+		'.xhtml': websafe,
         '.xml': websafe
     }
     globals = {}

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to