Mercurial > p > roundup > code
comparison roundup/cgi/templating.py @ 3332:c8cdfa100a9b
use unicode for index searches [SF#1195739]
| author | Alexander Smishlajev <a1s@users.sourceforge.net> |
|---|---|
| date | Sun, 22 May 2005 17:57:26 +0000 |
| parents | 8c7b522dc934 |
| children | afe094d2daed |
comparison
equal
deleted
inserted
replaced
| 3331:7bc09d5d9544 | 3332:c8cdfa100a9b |
|---|---|
| 2220 | 2220 |
| 2221 # get the list of ids we're batching over | 2221 # get the list of ids we're batching over |
| 2222 klass = self.client.db.getclass(self.classname) | 2222 klass = self.client.db.getclass(self.classname) |
| 2223 if self.search_text: | 2223 if self.search_text: |
| 2224 matches = self.client.db.indexer.search( | 2224 matches = self.client.db.indexer.search( |
| 2225 re.findall(r'\b\w{2,25}\b', self.search_text), klass) | 2225 [w.upper().encode("utf-8", "replace") for w in re.findall( |
| 2226 r'(?u)\b\w{2,25}\b', | |
| 2227 unicode(self.search_text, "utf-8", "replace") | |
| 2228 )], klass) | |
| 2226 else: | 2229 else: |
| 2227 matches = None | 2230 matches = None |
| 2228 | 2231 |
| 2229 # filter for visibility | 2232 # filter for visibility |
| 2230 check = self._client.db.security.hasPermission | 2233 check = self._client.db.security.hasPermission |
