Skip to content

Commit 0ce2128

Browse files
committed
Fixes #3394
1 parent e7ed2bb commit 0ce2128

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/core/agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -920,7 +920,7 @@ def limitQuery(self, num, query, field=None, uniqueField=None):
920920
elif Backend.isDbms(DBMS.HSQLDB):
921921
match = re.search(r"ORDER BY [^ ]+", limitedQuery)
922922
if match:
923-
limitedQuery = re.sub(r"\s*%s\s*" % match.group(0), " ", limitedQuery).strip()
923+
limitedQuery = re.sub(r"\s*%s\s*" % re.escape(match.group(0)), " ", limitedQuery).strip()
924924
limitedQuery += " %s" % match.group(0)
925925

926926
if query.startswith("SELECT "):

0 commit comments

Comments
 (0)