mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-20 02:50:46 -06:00
Fix escaping of Execute SQL results
Fix the HTML escaping of the success/error messages at the bottom of the Execute SQL tab. This also simplifies the code a bit. See issue #823.
This commit is contained in:
@@ -975,11 +975,7 @@ void MainWindow::executeQuery()
|
||||
{
|
||||
// The query takes the last placeholder as it may itself contain the sequence '%' + number
|
||||
statusMessage = tr("%1 rows returned in %2ms from: %3").arg(
|
||||
#if QT_VERSION < 0x050000
|
||||
sqlWidget->getModel()->totalRowCount()).arg(timer.elapsed()).arg(Qt::escape(queryPart.trimmed()));
|
||||
#else
|
||||
sqlWidget->getModel()->totalRowCount()).arg(timer.elapsed()).arg(queryPart.trimmed().toHtmlEscaped());
|
||||
#endif
|
||||
sqlWidget->getModel()->totalRowCount()).arg(timer.elapsed()).arg(queryPart.trimmed());
|
||||
sqlWidget->enableSaveButton(true);
|
||||
sql3status = SQLITE_OK;
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ QString SqlExecutionArea::getSelectedSql() const
|
||||
|
||||
void SqlExecutionArea::finishExecution(const QString& result)
|
||||
{
|
||||
ui->editErrors->setText(result);
|
||||
ui->editErrors->setPlainText(result);
|
||||
|
||||
// Set column widths according to their contents but make sure they don't exceed a certain size
|
||||
ui->tableResult->resizeColumnsToContents();
|
||||
|
||||
Reference in New Issue
Block a user