From 0ce2128a9b9c1a0d6a753fa5d16ad18d70062390 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Mon, 3 Dec 2018 22:40:44 +0100 Subject: [PATCH] Fixes #3394 --- lib/core/agent.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/core/agent.py b/lib/core/agent.py index 48bf658a1..f95e92ddd 100644 --- a/lib/core/agent.py +++ b/lib/core/agent.py @@ -920,7 +920,7 @@ class Agent(object): elif Backend.isDbms(DBMS.HSQLDB): match = re.search(r"ORDER BY [^ ]+", limitedQuery) if match: - limitedQuery = re.sub(r"\s*%s\s*" % match.group(0), " ", limitedQuery).strip() + limitedQuery = re.sub(r"\s*%s\s*" % re.escape(match.group(0)), " ", limitedQuery).strip() limitedQuery += " %s" % match.group(0) if query.startswith("SELECT "):