summaryrefslogtreecommitdiffstats
path: root/qmake/generators
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-08-16 01:00:32 +0200
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-08-16 01:00:33 +0200
commit56f46ba13dd9273b4be4e8f1f1f867a6feff04da (patch)
treec05a8f2bea5f645eaff32a5aa0380a9704366b6e /qmake/generators
parent37bae591b7829cd8ac6a9c8556bbe6b96b365bc3 (diff)
parent66a1975200c5ec106205522c37e32f990df84883 (diff)
Merge remote-tracking branch 'origin/5.13' into dev
Diffstat (limited to 'qmake/generators')
-rw-r--r--qmake/generators/xmloutput.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/qmake/generators/xmloutput.cpp b/qmake/generators/xmloutput.cpp
index 2f48763550..7fc1b081c7 100644
--- a/qmake/generators/xmloutput.cpp
+++ b/qmake/generators/xmloutput.cpp
@@ -113,7 +113,8 @@ QString XmlOutput::doConversion(const QString &text)
// this is a way to escape characters that shouldn't be converted
for (int i=0; i<text.count(); ++i) {
- if (text.at(i) == QLatin1Char('&')) {
+ const QChar c = text.at(i);
+ if (c == QLatin1Char('&')) {
if ( (i + 7) < text.count() &&
text.at(i + 1) == QLatin1Char('#') &&
text.at(i + 2) == QLatin1Char('x') &&
@@ -122,12 +123,15 @@ QString XmlOutput::doConversion(const QString &text)
} else {
output += QLatin1String("&amp;");
}
+ } else if (c == QLatin1Char('<')) {
+ output += QLatin1String("&lt;");
+ } else if (c == QLatin1Char('>')) {
+ output += QLatin1String("&gt;");
} else {
- QChar c = text.at(i);
if (c.unicode() < 0x20) {
output += QString("&#x%1;").arg(c.unicode(), 2, 16, QLatin1Char('0'));
} else {
- output += text.at(i);
+ output += c;
}
}
}