diff --git a/src/plugins/coreplugin/icore.cpp b/src/plugins/coreplugin/icore.cpp
index 62c742be277..53bec274faa 100644
--- a/src/plugins/coreplugin/icore.cpp
+++ b/src/plugins/coreplugin/icore.cpp
@@ -1183,7 +1183,8 @@ void ICore::saveSettings(SaveSettingsReason reason)
QStringList ICore::additionalAboutInformation()
{
auto aboutInformation = d->m_aboutInformation;
- aboutInformation.prepend(d->m_prependAboutInformation);
+ if (!d->m_prependAboutInformation.isEmpty())
+ aboutInformation.prepend(d->m_prependAboutInformation);
return aboutInformation;
}
@@ -1200,7 +1201,7 @@ void ICore::clearAboutInformation()
*/
void ICore::setPrependAboutInformation(const QString &line)
{
- d->m_prependAboutInformation = line;
+ d->m_prependAboutInformation = line.toHtmlEscaped();
}
/*!
@@ -1208,7 +1209,7 @@ void ICore::setPrependAboutInformation(const QString &line)
*/
void ICore::appendAboutInformation(const QString &line)
{
- d->m_aboutInformation.append(line);
+ d->m_aboutInformation.append(line.toHtmlEscaped());
}
/*!
@@ -1253,33 +1254,30 @@ QString ICore::aboutInformationHtml()
QLatin1String(__TIME__));
#endif
- const QString br = QLatin1String("
");
+ static const QString br = QLatin1String("
");
+ const auto wrapBr = [](const QString &s) { return s.isEmpty() ? QString() : br + s + br; };
const QStringList additionalInfoLines = ICore::additionalAboutInformation();
- const QString additionalInfo =
- QStringList(Utils::transform(additionalInfoLines, &QString::toHtmlEscaped)).join(br);
+ const QString additionalInfo = additionalInfoLines.join(br);
const QString information
- = Tr::tr("