Permalink
Browse files

Merge pull request #7265 from spycrab/qt_fix_html_log

Qt/LogWidget: Fix messages not being escaped properly
  • Loading branch information...
spycrab committed Jul 14, 2018
2 parents 865d737 + e9158ba commit f184718d1bcf446d982661b4113487af77929e0c
Showing with 5 additions and 4 deletions.
  1. +5 −4 Source/Core/DolphinQt/Config/LogWidget.cpp
@@ -210,10 +210,11 @@ void LogWidget::Log(LogTypes::LOG_LEVELS level, const char* text)
break;
}
m_log_queue.push(QStringLiteral("%1 <font color='%2'>%3</font>")
.arg(QString::fromStdString(std::string(text).substr(0, TIMESTAMP_LENGTH)),
QString::fromStdString(color),
QString::fromStdString(std::string(text).substr(TIMESTAMP_LENGTH))));
m_log_queue.push(
QStringLiteral("%1 <font color='%2'>%3</font>")
.arg(QString::fromStdString(std::string(text).substr(0, TIMESTAMP_LENGTH)),
QString::fromStdString(color),
QString::fromStdString(std::string(text).substr(TIMESTAMP_LENGTH)).toHtmlEscaped()));
}
void LogWidget::closeEvent(QCloseEvent*)

0 comments on commit f184718

Please sign in to comment.