diff mercurial/hgweb/hgweb_mod.py @ 37223:08e042f0a67c

templatefilters: declare input type as bytes where appropriate Some test outputs changed since input is now coerced to a byte string. I think that's okay. Maybe {date} should have some readable representation?
author Yuya Nishihara <yuya@tcha.org>
date Sun, 18 Mar 2018 15:42:28 +0900
parents 307ee8883975
children cb7b275c0cd0
line wrap: on
line diff
--- a/mercurial/hgweb/hgweb_mod.py	Sun Mar 18 15:14:58 2018 +0900
+++ b/mercurial/hgweb/hgweb_mod.py	Sun Mar 18 15:42:28 2018 +0900
@@ -173,7 +173,7 @@
 
         filters = {}
         templatefilter = registrar.templatefilter(filters)
-        @templatefilter('websub')
+        @templatefilter('websub', intype=bytes)
         def websubfilter(text):
             return templatefilters.websub(text, self.websubtable)