diff options
Diffstat (limited to 'lib/sqlalchemy/sql/compiler.py')
-rw-r--r-- | lib/sqlalchemy/sql/compiler.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/sqlalchemy/sql/compiler.py b/lib/sqlalchemy/sql/compiler.py index 5cfb42a63..cdb680431 100644 --- a/lib/sqlalchemy/sql/compiler.py +++ b/lib/sqlalchemy/sql/compiler.py @@ -281,7 +281,8 @@ class DefaultCompiler(engine.Compiled): def escape_literal_column(self, text): """provide escaping for the literal_column() construct.""" - return re.sub('%', '%%', text) + # TODO: some dialects might need different behavior here + return text.replace('%', '%%') def visit_fromclause(self, fromclause, **kwargs): return fromclause.name |