Details
-
Bug
-
Resolution: Out of scope
-
P3: Somewhat important
-
None
-
4.8.5, 4.8.6, 5.1.1, 5.2.0
-
None
Description
QXmlStreamReader handles the apostrophe char correctly whether it is escaped or not. On the other hand the QXmlStreamWriter doesn't escape the apostrophe
main.cpp
#include <QXmlStreamReader> #include <QxmlStreamWriter> #include <QtDebug> int main( int argc, char* argv[] ) { QApplication a(argc, argv); QByteArray byteArray; QXmlStreamWriter writer(&byteArray); writer.setAutoFormatting(true); writer.writeStartDocument(); writer.writeTextElement("Apostroph", "'"); writer.writeEndDocument(); qDebug() << byteArray; QXmlStreamReader reader(byteArray); while (!reader.atEnd()) { if (reader.readNextStartElement()) qDebug() << reader.readElementText(); } return 0; }
Attachments
For Gerrit Dashboard: QTBUG-33643 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
66414,1 | Add apostrophe escaping to QXmlStreamWriter | stable | qt/qtbase | Status: ABANDONED | -2 | 0 |