summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qurl.h
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2012-03-30 16:21:45 -0300
committerQt by Nokia <qt-info@nokia.com>2012-04-11 23:32:18 +0200
commit997ac954abe8e4f7d9323f13a79989f277de8301 (patch)
treebcbeefb06a533d68d59e38bb68a63d7f7f915f15 /src/corelib/io/qurl.h
parenta01c662d3737fd9f26a7e4455d7bcb03628155d7 (diff)
Allow {} to remain decoded in URLs in the path and query
This allows things like http://example.com/{1234-5678}?id={abcd-ef01}. But do not allow it in other parts of the URL. I could allow it in the fragment, but in the username and password it would be too ugly. In order to do that, make DecodeReserved use two bits and have PrettyDecoded set only one of them. That way, toString(PrettyDecoded) can be distinguished from toString(PrettyDecoded | DecodeReserved), just as path(PrettyDecoded) can be distinguished from path(PrettyDecoded & ~DecodeDelimiters). Also, take the opportunity to avoid decoding the reserved characters in the query. Keep them encoded as they should be. Change-Id: I1604a0c8015c6b03dc2fbf49ea9d1dbed96fc186 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Diffstat (limited to 'src/corelib/io/qurl.h')
-rw-r--r--src/corelib/io/qurl.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/corelib/io/qurl.h b/src/corelib/io/qurl.h
index 27b81dfc0f..ff46a8ac1a 100644
--- a/src/corelib/io/qurl.h
+++ b/src/corelib/io/qurl.h
@@ -142,9 +142,10 @@ public:
DecodeSpaces = 0x100000,
DecodeUnicode = 0x200000,
DecodeDelimiters = 0x400000 | 0x800000,
- DecodeReserved = 0x1000000,
+ PrettyDecodeReserved = 0x1000000,
+ DecodeReserved = PrettyDecodeReserved | 0x2000000,
- PrettyDecoded = DecodeSpaces | DecodeDelimiters | DecodeReserved | DecodeUnicode,
+ PrettyDecoded = DecodeSpaces | DecodeDelimiters | PrettyDecodeReserved | DecodeUnicode,
MostDecoded = PrettyDecoded
};
Q_DECLARE_FLAGS(ComponentFormattingOptions, ComponentFormattingOption)