Commit 762d70a9 authored by Praibait's avatar Praibait

Echappement de l'apostrophe dans la recherche des invités.

parent 16a0ffd5
......@@ -298,7 +298,7 @@ def quick_search(term, old=False, byidbde=False, hide_solde=False, exclude=None,
FROM %(always_from)s%(specific_from)s
WHERE %(always_where)s%(specific_where)s%(oldclause)s;
"""
# On ne tente de faire un matching de regex que si le term fourni est une regexp comprise par pgsql
# On ne fait pas le test dans le cas d'idbde puisque le terme donné est un int
is_regex = not byidbde and _is_pg_regexp(term)
......@@ -406,6 +406,7 @@ def search_invite(term, idact):
invites = []
con, cur = BaseFonctions.getcursor()
term = term.replace("'", "''")
cur.execute(u"""SELECT 'invite' AS type, i.id AS idbde, i.nom, i.prenom,
c.idbde AS Ridbde, c.nom AS Rnom, c.prenom AS Rprenom, c.pseudo AS pseudo, c.solde AS solde
FROM invites AS i
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment