Mercurial > moin > 1.9
changeset 2962:5175bd01d5d8
Navigation macro: use re.escape to fix problems with pagenames containing special regex chars (thanks to Boleslaw Kulbabinski)
author | Thomas Waldmann <tw AT waldmann-edv DOT de> |
---|---|
date | Mon, 17 Dec 2007 09:59:39 +0100 |
parents | fa3e3d441dce |
children | 4f2ce9dc42e8 |
files | MoinMoin/macro/Navigation.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/MoinMoin/macro/Navigation.py Thu Dec 13 11:22:16 2007 +0100 +++ b/MoinMoin/macro/Navigation.py Mon Dec 17 09:59:39 2007 +0100 @@ -127,7 +127,7 @@ # iterate over children, adding links to all of them result = [] - children = _getPages(request, '^%s/' % parent) + children = _getPages(request, '^%s/' % re.escape(parent)) for child in children: # display short page name, leaving out the parent path # (and make sure the name doesn't get wrapped) @@ -175,7 +175,7 @@ # leave out the following on slide pages if focus is None: - children = _getPages(request, '^%s/' % self.pagename) + children = _getPages(request, '^%s/' % re.escape(self.pagename)) if children: # add link to first child if one exists result.append(' ')