Mercurial > hg
comparison mercurial/templates/paper/search.tmpl @ 37400:47aea60d114d
hgweb: fix search {entries} to not return results of template expansion
"{entries%changelogentry}" in raw/search.tmpl was utterly wrong because
"{entries}" here was a generator yielding results of template expansion.
That's why we have a weird hack in runmap(), which I'm going to get rid of.
https://www.mercurial-scm.org/repo/hg/file/4.5.2/mercurial/templater.py#l469
We have two choices:
a) drop "%changelogentry" from raw/search.tmpl
b) fix "{entries}" to yield mappings
I take (b) because that's what the other log-like "{entries}" do. The
"entries" keyword is wrapped by mappinggenerator so "{entries}" without
"%searchentry" still works.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 18 Mar 2018 20:51:39 +0900 |
parents | cba4461aa0a0 |
children |
comparison
equal
deleted
inserted
replaced
37399:0b64416224d9 | 37400:47aea60d114d |
---|---|
47 <th class="author">author</th> | 47 <th class="author">author</th> |
48 <th class="description">description</th> | 48 <th class="description">description</th> |
49 </tr> | 49 </tr> |
50 </thead> | 50 </thead> |
51 <tbody class="stripes2"> | 51 <tbody class="stripes2"> |
52 {entries} | 52 {entries%changelogentry} |
53 </tbody> | 53 </tbody> |
54 </table> | 54 </table> |
55 | 55 |
56 <div class="navigate"> | 56 <div class="navigate"> |
57 <a href="{url|urlescape}log{lessvars%urlparameter}">less</a> | 57 <a href="{url|urlescape}log{lessvars%urlparameter}">less</a> |