changeset 172:c22b53fb1796

fixed MoinMoinBugs/SpaceAndUnderscoreNotSynonymsInLinktoSearch imported from: moin--main--1.5--patch-174
author Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
date Mon, 31 Oct 2005 07:38:56 +0000
parents 11740ebb136c
children 92e3a82bfe3e
files MoinMoin/formatter/base.py MoinMoin/search.py
diffstat 2 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/formatter/base.py	Sun Oct 30 22:32:35 2005 +0000
+++ b/MoinMoin/formatter/base.py	Mon Oct 31 07:38:56 2005 +0000
@@ -76,9 +76,10 @@
             will be used.
         """
         if not self._store_pagelinks or not on or kw.get('generated'): 
-            return
+            return ''
         if not pagename and page:
             pagename = page.page_name
+        pagename = pagename.replace(" ", "_")
         if pagename and pagename not in self.pagelinks:
             self.pagelinks.append(pagename)
 
--- a/MoinMoin/search.py	Sun Oct 30 22:32:35 2005 +0000
+++ b/MoinMoin/search.py	Mon Oct 31 07:38:56 2005 +0000
@@ -366,6 +366,7 @@
         @param use_re: treat pattern as re of plain text, bool
         @param case: do case sensitive search, bool 
         """
+        pattern = pattern.replace(" ", "_")
         # used for search in links
         self._pattern = pattern
         # used for search in text