diff options
author | Marcos Henrich <marcos.henrich@xamarin.com> | 2015-09-04 07:36:27 +0300 |
---|---|---|
committer | Marcos Henrich <marcos.henrich@xamarin.com> | 2015-09-04 07:36:27 +0300 |
commit | a1b27833730eb60864aec9006641f6df6997901a (patch) | |
tree | cc0abd333a49924944c5a5abbadf6ef08d929dcf /mcs | |
parent | 85f33ffe2a27833e08f0bfc57e6d56c431bb835f (diff) |
Fixes Uri.UserInfo with spaces.
Fixes #31172.
Diffstat (limited to 'mcs')
-rw-r--r-- | mcs/class/System/System/UriParseComponents.cs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/mcs/class/System/System/UriParseComponents.cs b/mcs/class/System/System/UriParseComponents.cs index 2e1e3c5d485..593ef053eac 100644 --- a/mcs/class/System/System/UriParseComponents.cs +++ b/mcs/class/System/System/UriParseComponents.cs @@ -326,6 +326,14 @@ namespace System { bool isEscapedChar = false; var oldIndex = index; + // Spaces should be percentage encoded #31172 + if (ch == ' ') { + if (sb == null) + sb = new StringBuilder (); + sb.Append ("%20"); + continue; + } + if (ch == '%'){ if (!Uri.IsHexEncoding (part, index)) return false; |