Render tunnel files as XML in webpage, not just text

This commit is contained in:
Philip Sargent
2022-10-15 14:07:15 +03:00
parent e0ac09d5ec
commit da09bc7968
2 changed files with 47 additions and 19 deletions

View File

@@ -279,7 +279,7 @@ def getmimetype(path):
if path.lower().endswith(".jpeg"): return "image/jpeg"
if path.lower().endswith(".jpg"): return "image/jpeg"
if path.lower().endswith("svg"): return "image/svg+xml"
if path.lower().endswith("xml"): return "application/xml" # we use "text/xhtml" for tunnel files
if path.lower().endswith("xml"): return "application/xml" # we use "text/xml" for tunnel files
if path.lower().endswith(".pdf"): return "application/pdf"
if path.lower().endswith(".ps"): return "application/postscript"
if path.lower().endswith(".svx"): return "application/x-survex-svx"