From 170469ef84fd7ce7805ff174aed5b3447fa8e7a2 Mon Sep 17 00:00:00 2001 From: David Faure Date: Mon, 1 Jul 2013 15:12:36 +0200 Subject: Fix QUrl::topLevelDomain(QUrl::FullyDecoded) qt_ACE_do(".co.uk") was returning an empty string because of the leading dot. This has always caused issues in KDE code too, where ACE normalization needs the dot removed, and re-added afterwards. Change-Id: Id9fcea0333cf55c14d755a86d4bf33a50f194429 Reviewed-by: Frederik Gladhorn --- src/corelib/io/qurlidna.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/corelib/io/qurlidna.cpp b/src/corelib/io/qurlidna.cpp index 70db9e09eb..619ab589a4 100644 --- a/src/corelib/io/qurlidna.cpp +++ b/src/corelib/io/qurlidna.cpp @@ -2479,7 +2479,8 @@ QString qt_ACE_do(const QString &domain, AceOperation op) if (labelLength == 0) { if (idx == domain.length()) break; - return QString(); // two delimiters in a row -- empty label not allowed + if (idx > 0) + return QString(); // two delimiters in a row -- empty label not allowed } // RFC 3490 says, about the ToASCII operation: -- cgit v1.2.3