Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update 6-Appendix: Leveraging Dev Tools - Encoding and Decoding(#1070) #1085

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

GincyAG
Copy link
Contributor

@GincyAG GincyAG commented Jul 18, 2023

This PR fixes #1070.

  • This PR handles the issue and requires no additional PRs.
  • You have validated the need for this change.

What did this PR accomplish?

  • Remove current form of HTML encoding/decoding
  • Add encodeURI()
  • Add usage of URL encode/decode

Thank you for your contribution!

- HTML decode: `unescape("string-to-decode")`
- base64 encode: `btoa("string-to-encode")` & base64 decode: `atob("string-to-decode")` - built-in JavaScript functions that are used to encode a string to base64 and decode a string from base64.
- URL encode: `encodeURIComponent("string-to-encode")` & URL decode: `decodeURIComponent("string-to-decode")` - It encodes and decodes user-supplied input that will be used as a part of a URL, and it encodes all characters that have special meanings in a URL, including reserved characters.
- URL encode: `encodeURI()` and URL decode: `decodeURI()` are functions used to encode and decode a complete URI, such as query parameters, path segments, or fragments, including special characters but excluding the reserved characters such as `:/?#[]@!$'()*+,;=` which have special meanings in a URL.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

URI

@kingthorin kingthorin added the revise Needs quality review, updates, or revision label Jul 18, 2023
@kingthorin kingthorin added this to the v4.3 Release milestone Jul 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
revise Needs quality review, updates, or revision
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wrong usage of JS functions (Appendix: Leveraging Dev Tools - Encoding and Decoding)
2 participants