Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.12.12
-
None
-
da0d7f61c8 (qt/qtbase/dev) da0d7f61c8 (qt/tqtc-qtbase/dev) c0aa21734d (qt/tqtc-qtbase/6.2) a65f67f5ab (qt/qtbase/6.3) a65f67f5ab (qt/tqtc-qtbase/6.3) 1892763c8c (qt/qtbase/6.4) 1892763c8c (qt/tqtc-qtbase/6.4) ce27e6f022 (qt/tqtc-qtbase/5.15)
Description
Downstream bug: https://bugs.kde.org/show_bug.cgi?id=455255
We are loading the SVG XML by wrapping a QIODevice in QXmlInputSource, then loading it with QDomDocument::setContent. After calling QDomImplementation::setInvalidDataPolicy(QDomImplementation::DropInvalidChars), QDomDocument::setContent strips non-BMP chars encoded in UTF-8 in the XML.
QDomDocument is loading the file as UTF-16 code units. In fixedCharData, it checks the code units one by one, using QXmlUtils::isChar which rejects half surrogates. This will, of course, strip all non-BMP code points.