Mercurial > moin > 1.9
changeset 2571:a7dc3cc36362
apparently underscores aren't valid in IDs, fix this
author | Johannes Berg <johannes AT sipsolutions DOT net> |
---|---|
date | Thu, 26 Jul 2007 16:26:44 +0200 |
parents | 896b81e9764e |
children | ce0787373150 |
files | MoinMoin/_tests/test_wikiutil.py MoinMoin/wikiutil.py |
diffstat | 2 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/MoinMoin/_tests/test_wikiutil.py Thu Jul 26 16:25:59 2007 +0200 +++ b/MoinMoin/_tests/test_wikiutil.py Thu Jul 26 16:26:44 2007 +0200 @@ -722,7 +722,7 @@ tests = [ # text expected output (u'\xf6\xf6ll\xdf\xdf', 'A.2BAPYA9g-ll.2BAN8A3w-'), - (u'level 2', 'level_2'), + (u'level 2', 'level2'), (u'', 'A'), (u'123', 'A123'), ]
--- a/MoinMoin/wikiutil.py Thu Jul 26 16:25:59 2007 +0200 +++ b/MoinMoin/wikiutil.py Thu Jul 26 16:26:44 2007 +0200 @@ -2101,7 +2101,7 @@ def anchor_name_from_text(text): quoted = urllib.quote_plus(text.encode('utf-7')) - res = quoted.replace('%', '.').replace('+', '_') + res = quoted.replace('%', '.').replace('+', '').replace('_', '') if not res[:1].isalpha(): return 'A%s' % res return res