summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qdataurl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/io/qdataurl.cpp')
-rw-r--r--src/corelib/io/qdataurl.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/corelib/io/qdataurl.cpp b/src/corelib/io/qdataurl.cpp
index 8002f10889..600f650bb5 100644
--- a/src/corelib/io/qdataurl.cpp
+++ b/src/corelib/io/qdataurl.cpp
@@ -61,11 +61,8 @@ Q_CORE_EXPORT bool qDecodeDataUrl(const QUrl &uri, QString &mimeType, QByteArray
// the following would have been the correct thing, but
// reality often differs from the specification. People have
// data: URIs with ? and #
- //QByteArray data = QByteArray::fromPercentEncoding(uri.encodedPath());
- QByteArray data = QByteArray::fromPercentEncoding(uri.toEncoded());
-
- // remove the data: scheme
- data.remove(0, 5);
+ //QByteArray data = QByteArray::fromPercentEncoding(uri.path(QUrl::PrettyDecoded).toLatin1());
+ QByteArray data = QByteArray::fromPercentEncoding(uri.url(QUrl::PrettyDecoded | QUrl::RemoveScheme).toLatin1());
// parse it:
int pos = data.indexOf(',');