Commit cfcec56f authored by Weblate's avatar Weblate

Merge remote-tracking branch 'origin/master'

parents 18dffe1d b6e7fca9
......@@ -54,14 +54,17 @@ QString XmlLogHandler::makeXmlPretty(QString xmlIn)
while (!reader.atEnd()) {
reader.readNext();
if (!reader.isWhitespace()) {
if (!reader.isWhitespace() && !reader.hasError()) {
writer.writeCurrentToken(reader);
}
}
// remove xml header
xmlOut.replace("<?xml version=\"1.0\"?>\n", "");
// remove last char (\n)
xmlOut.replace("<?xml version=\"1.0\"?>", "");
// remove first & last char (\n)
// first char is needed due to header replacement
xmlOut = xmlOut.right(xmlOut.size() - 1);
xmlOut = xmlOut.left(xmlOut.size() - 1);
return xmlOut;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment