summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/io/qurlinternal
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2016-04-20 22:23:54 -0700
committerThiago Macieira <thiago.macieira@intel.com>2016-04-26 23:08:11 +0000
commit6e306e8d942464d969c3792e6299aa014a2d2b8f (patch)
tree43e05c418bde3cda0f71e42813a65c9334d0ec18 /tests/auto/corelib/io/qurlinternal
parent40e4f75786228041c0bb9ab21268589d6dc75985 (diff)
Disallow non-character Unicode codepoints in QUrl/QUrlQuery
Since they are non-characters and should not be used for text interchange, it stands to reason that they should not appear in unencoded for in a URL. To change the behavior, we just need to toggle a simple flag for QUtf8Functions. This behavior also matches the recommendation from RFC 3987. We do not usually follow recommendations from that RFC (as it is generally believed to be a bad RFC), but this one seems like a good idea. Change-Id: Ifea6e497f11a461db432ffff1447486c623c12bd Reviewed-by: David Faure <david.faure@kdab.com>
Diffstat (limited to 'tests/auto/corelib/io/qurlinternal')
-rw-r--r--tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp b/tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp
index 9af4345029..f5835ec5f4 100644
--- a/tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp
+++ b/tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp
@@ -998,7 +998,9 @@ void tst_QUrlInternal::encodingRecodeInvalidUtf8_data()
QTest::addColumn<QString>("utf16");
extern void loadInvalidUtf8Rows();
+ extern void loadNonCharactersRows();
loadInvalidUtf8Rows();
+ loadNonCharactersRows();
QTest::newRow("utf8-mix-4") << QByteArray("\xE0.A2\x80");
QTest::newRow("utf8-mix-5") << QByteArray("\xE0\xA2.80");