--- qt-everywhere-src-6.8.3.old/qtbase/src/corelib/io/qdataurl.cpp +++ qt-everywhere-src-6.8.3/qtbase/src/corelib/io/qdataurl.cpp @@ -47,10 +47,10 @@ QLatin1StringView textPlain; constexpr auto charset = "charset"_L1; if (QLatin1StringView{data}.startsWith(charset, Qt::CaseInsensitive)) { - qsizetype i = charset.size(); - while (data.at(i) == ' ') - ++i; - if (data.at(i) == '=') + QByteArrayView copy = data.sliced(charset.size()); + while (copy.startsWith(' ')) + copy.slice(1); + if (copy.startsWith('=')) textPlain = "text/plain;"_L1; }