changeset 1965:388f477fd536

WordIndex/TitleIndex: fix invalid IDs
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 08 Apr 2007 20:55:29 +0200
parents 911fe470bfae
children 44570fb9d7c8
files MoinMoin/macro/__init__.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/macro/__init__.py	Sun Apr 08 20:43:34 2007 +0200
+++ b/MoinMoin/macro/__init__.py	Sun Apr 08 20:55:29 2007 +0200
@@ -207,7 +207,7 @@
         for word in all_words:
             letter = wikiutil.getUnicodeIndexGroup(word)
             if letter != current_letter:
-                cssid = wikiutil.quoteWikinameURL(letter).replace('%','')
+                cssid = "idx" + wikiutil.quoteWikinameURL(letter).replace('%','')
                 output.append(fmt.heading(1, 2, id=cssid)) # fmt.anchordef didn't work
                 output.append(fmt.text(letter.replace('~', 'Others')))
                 output.append(fmt.heading(0, 2))
@@ -234,7 +234,7 @@
         def _make_index_key(index_letters):
             index_letters.sort()
             def letter_link(ch):
-                cssid = wikiutil.quoteWikinameURL(ch).replace('%','')
+                cssid = "idx" + wikiutil.quoteWikinameURL(ch).replace('%','')
                 return fmt.anchorlink(1, cssid) + fmt.text(ch.replace('~', 'Others')) + fmt.anchorlink(0)
             links = [letter_link(letter) for letter in index_letters]
             return ' | '.join(links)