Skip to content

escape backslashes in python and php output filters#849

Open
alhudz wants to merge 1 commit into
andialbrecht:masterfrom
alhudz:output-filter-backslash-escape
Open

escape backslashes in python and php output filters#849
alhudz wants to merge 1 commit into
andialbrecht:masterfrom
alhudz:output-filter-backslash-escape

Conversation

@alhudz
Copy link
Copy Markdown

@alhudz alhudz commented Jun 1, 2026

OutputPythonFilter and OutputPHPFilter in filters/output.py escape the wrapping quote but not backslashes, so a backslash in the SQL gets reinterpreted (\n, \t) and a trailing backslash escapes the closing quote, breaking out of the generated string literal. Escape backslashes before the quote in both filters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant