X-Git-Url: https://codewiz.org/gitweb?p=geekigeeki.git;a=blobdiff_plain;f=geekigeeki.py;fp=geekigeeki.py;h=2dbf03b82674125d32d0ddedbdcb9e58224c2cf7;hp=7700585b975aefeda856cefd643d4276f66cb1d0;hb=a4def29f92f1c5743da5d7bf86b4214579bf385d;hpb=5efe010b1b7a8099a4fbb8cfb2a9b97268cb12b8 diff --git a/geekigeeki.py b/geekigeeki.py index 7700585..2dbf03b 100755 --- a/geekigeeki.py +++ b/geekigeeki.py @@ -110,8 +110,9 @@ def emit_header(mtime=None, mime_type="text/html"): # Prevent caching when the wiki engine gets updated mtime = max(mtime, os.stat(__file__).st_mtime) print("Last-Modified: " + strftime("%a, %d %b %Y %H:%M:%S GMT", gmtime(mtime))) - if mime_type: - print("Content-type: " + mime_type + "; charset=utf-8") + else: + print("Cache-Control: must-revalidate, max-age=0") + print("Content-type: " + mime_type + "; charset=utf-8") print('') def send_guru(msg_text, msg_type): @@ -474,8 +475,8 @@ class WikiFormatter: | (?P \[\[[^\]]+\]\]) # Inline HTML - | (?P <(br|hr|div|span|form|iframe|input|textarea|a|img|h[1-5])\b ) - | (?P ( /\s*> | ) ) + | (?P <(br|hr|small|div|span|form|iframe|input|textarea|a|img|h[1-5])\b ) + | (?P ( /\s*> | ) ) | (?P [<>&] ) # Auto links (LEGACY) @@ -646,7 +647,7 @@ class Page: if title_done: return # HEAD - emit_header(self._mtime()) + emit_header(name and self._mtime()) print('\n') print("%s: %s" % (config_get('site_name', "Unconfigured Wiki"), text)) print(' ')