Open jsweet-datto opened 5 years ago
Thanks for the report, @jsweet-datto. I agree it can be confusing. I think we would need some concrete proposals about what could be changed.
Can anyone take a look at my approach in linked PR? If the approach is ok I'll fix the PR to meet all requirements
If you put characters that should be percent-encoded in a string passed to Uri.Path(), it will automatically percent-encode them (e.g. turn a space into %20). Unless the character itself is a percent, in which case it assumes you are trying to percent encode this. I guess this is sort of by design, but the ambiguity definitely can create bugs. Ideally there'd be two variants you could pass to, one that expected unencoded input and encoded everything (including %), and another that expects encoded input and rejects characters that need to be percent-encoded.