fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
move fragment to book detail
[wolnelektury.git]
/
src
/
search
/
views.py
diff --git
a/src/search/views.py
b/src/search/views.py
index
67c3fd4
..
5b65a30
100644
(file)
--- a/
src/search/views.py
+++ b/
src/search/views.py
@@
-132,6
+132,10
@@
def hint(request):
@cache.never_cache
def main(request):
query = request.GET.get('q', '')
@cache.never_cache
def main(request):
query = request.GET.get('q', '')
+ query = ' '.join(query.split())
+ # filter out private use characters
+ import unicodedata
+ query = ''.join(ch for ch in query if unicodedata.category(ch) != 'Co')
if len(query) < 2:
return render_to_response(
if len(query) < 2:
return render_to_response(