comparison mercurial/hgweb/hgweb_mod.py @ 37020:16bbb15406c9

hgweb: evaluate the "default" value as template Strictly speaking, everything in the map file is a template. So let's not take out an unparsed template string.
author Yuya Nishihara <yuya@tcha.org>
date Sun, 03 Apr 2016 14:16:47 +0900
parents c97b936d8bb5
children 1cfef5693203
comparison
equal deleted inserted replaced
37019:c97b936d8bb5 37020:16bbb15406c9
384 # check read permissions non-static content 384 # check read permissions non-static content
385 if cmd != 'static': 385 if cmd != 'static':
386 self.check_perm(rctx, req, None) 386 self.check_perm(rctx, req, None)
387 387
388 if cmd == '': 388 if cmd == '':
389 req.qsparams['cmd'] = rctx.tmpl.cache['default'] 389 req.qsparams['cmd'] = rctx.tmpl.render('default', {})
390 cmd = req.qsparams['cmd'] 390 cmd = req.qsparams['cmd']
391 391
392 # Don't enable caching if using a CSP nonce because then it wouldn't 392 # Don't enable caching if using a CSP nonce because then it wouldn't
393 # be a nonce. 393 # be a nonce.
394 if rctx.configbool('web', 'cache') and not rctx.nonce: 394 if rctx.configbool('web', 'cache') and not rctx.nonce: