Ticket #291 (new defect) — at Version 1

Opened 4 years ago

Last modified 4 years ago

Investigate search options encoding

Reported by: dread Owned by: rgrp
Priority: minor Milestone:
Component: ckan Keywords:
Cc: Repository:
Theme:

Description (last modified by dread) (diff)

On ckan.net there is this unchecked-in 'temporary hack'. It seems to be to do with foreign characters in search options. See what its doing and if necessary, put check it in.

diff -r 813ad8b5de0b ckan/lib/search.py
--- a/ckan/lib/search.py	Mon Mar 01 22:23:36 2010 +0100
+++ b/ckan/lib/search.py	Thu Apr 15 19:11:42 2010 +0200
@@ -63,6 +63,9 @@
     def query(self, options):
         '''For the given search options, returns a query object.'''
         self._options = options
+        # temporary hack!
+        if self._options.q:
+            self._options.q = self._options.q.encode('utf8')
         general_terms, field_specific_terms = self._parse_query_string()
 
         if not general_terms and \

Change History

comment:1 Changed 4 years ago by dread

  • Description modified (diff)
Note: See TracTickets for help on using tickets.