Skip to content

Conversation

ManickaP
Copy link
Member

@ManickaP ManickaP commented Oct 7, 2024

UrlEncode is suitable only for query segment or x-www-form-urlencoded content. Also the list of unescaped punction doesn't follow neither URI RFC (old or new) nor any other spec I could find.

@ManickaP ManickaP requested a review from a team as a code owner October 7, 2024 14:43
@ManickaP ManickaP requested a review from MihaZupan October 7, 2024 14:43
@ghost ghost added the area-System.Net label Oct 7, 2024
Copy link

Learn Build status updates of commit 11eb380:

⚠️ Validation status: warnings

File Status Preview URL Details
xml/System.Net/WebUtility.xml ⚠️Warning View Details

xml/System.Net/WebUtility.xml

  • Line 0, Column 0: [Warning: xref-not-found - See documentation] Cross reference not found: 'System.Uri.WebUtility.EscapeDataString*'.
  • Line 0, Column 0: [Warning: xref-not-found - See documentation] Cross reference not found: 'System.Uri.WebUtility.EscapeDataString*'.

For more details, please refer to the build report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

For any questions, please:

Copy link

Learn Build status updates of commit 216c332:

⚠️ Validation status: warnings

File Status Preview URL Details
xml/System.Net/WebUtility.xml ⚠️Warning View Details

xml/System.Net/WebUtility.xml

  • Line 0, Column 0: [Warning: xref-not-found - See documentation] Cross reference not found: 'System.Uri.WebUtility.EscapeDataString*'.
  • Line 0, Column 0: [Warning: xref-not-found - See documentation] Cross reference not found: 'System.Net.WebUtility.UrlDecode'.
  • Line 0, Column 0: [Warning: xref-not-found - See documentation] Cross reference not found: 'System.Uri.WebUtility.EscapeDataString*'.
  • Line 0, Column 0: [Warning: xref-not-found - See documentation] Cross reference not found: 'System.Net.WebUtility.UrlDecodeToBytes'.

For more details, please refer to the build report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

For any questions, please:

Copy link

Learn Build status updates of commit 4c2ebf8:

✅ Validation status: passed

File Status Preview URL Details
xml/System.Net/WebUtility.xml ✅Succeeded View

For more details, please refer to the build report.

For any questions, please:

@MihaZupan
Copy link
Member

Also the list of unescaped punction doesn't follow neither URI RFC (old or new) nor any other spec I could find.

https://github.com/dotnet/runtime/blob/770df102b0dfbf16c22ef64a270a989495cfe145/src/libraries/System.Private.CoreLib/src/System/Net/WebUtility.cs#L572

The code mentions https://datatracker.ietf.org/doc/html/rfc1738 that includes this bit:

safe           = "$" | "-" | "_" | "." | "+"
extra          = "!" | "*" | "'" | "(" | ")" | ","

but even that doesn't match the characters used 😄

@ManickaP ManickaP merged commit 6bb990d into dotnet:main Oct 8, 2024
4 checks passed
@ManickaP ManickaP deleted the url-encode branch October 8, 2024 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants