Skip to content

Commit 1870f85

Browse files
committed
Trim SQL string before logging them
See issue sqlitebrowser#337
1 parent d5164a0 commit 1870f85

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/sqlitedb.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1065,6 +1065,9 @@ DBBrowserObject DBBrowserDB::getObjectByName(const QString& name) const
10651065

10661066
void DBBrowserDB::logSQL(QString statement, int msgtype)
10671067
{
1068+
// Remove any leading and trailing spaces, tabs, or line breaks first
1069+
statement = statement.trimmed();
1070+
10681071
// Replace binary log messages by a placeholder text instead of printing gibberish
10691072
for(int i=0;i<statement.size();i++)
10701073
{

0 commit comments

Comments
 (0)