| Index: sdk/lib/uri/encode_decode.dart
|
| diff --git a/sdk/lib/uri/encode_decode.dart b/sdk/lib/uri/encode_decode.dart
|
| index 0e94e1f98a2cf18a0124c317f25293c3b4afd743..e8d483bf67174ac291b66fa39cf17100625f3009 100644
|
| --- a/sdk/lib/uri/encode_decode.dart
|
| +++ b/sdk/lib/uri/encode_decode.dart
|
| @@ -22,7 +22,7 @@ part of dart.uri;
|
| */
|
| String encodeUri(String uri) {
|
| return _uriEncode(
|
| - "-_.!~*'()#;,/?:@&=+\$0123456789"
|
| + "-_.!~*'()#;,/?:@&=\$0123456789"
|
| "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", uri);
|
| }
|
|
|
| @@ -82,6 +82,8 @@ String _uriEncode(String canonical, String text) {
|
| for (int i = 0; i < text.length; i++) {
|
| if (canonical.indexOf(text[i]) >= 0) {
|
| result.add(text[i]);
|
| + } else if (text[i] == " ") {
|
| + result.add("+");
|
| } else {
|
| int ch = text.charCodeAt(i);
|
| if (ch >= 0xD800 && ch < 0xDC00) {
|
| @@ -137,7 +139,11 @@ String _uriDecode(String text) {
|
| for (int i = 0; i < text.length;) {
|
| String ch = text[i];
|
| if (ch != '%') {
|
| - result.add(ch);
|
| + if (ch == '+') {
|
| + result.add(" ");
|
| + } else {
|
| + result.add(ch);
|
| + }
|
| i++;
|
| } else {
|
| codepoints.clear();
|
|
|