[michael] fix bug when searching text containing a ' in history window. fixes #3091
This commit is contained in:
parent
54d9b8736e
commit
c78a8b4380
|
@ -484,7 +484,7 @@ class Logger:
|
|||
|
||||
else: # user just typed something, we search in message column
|
||||
where_sql = self._build_contact_where(account, jid)
|
||||
like_sql = '%' + query + '%'
|
||||
like_sql = '%' + query.replace("'", "''") + '%'
|
||||
self.cur.execute('''
|
||||
SELECT contact_name, time, kind, show, message, subject FROM logs
|
||||
WHERE (%s) AND message LIKE '%s'
|
||||
|
|
Loading…
Reference in New Issue