Languages
[Edit]
EN

TypeScript - decode url characters

0 points
Created by:
evangeline
420

In this short article, we would like to show how in TypeScript, use decodeURIComponent() function to decode escaped unsafe characters in some URLs.

Hint: to know more about what characters are encoded/decoded read this article

Quick solution:

Where:

  • message value could be located in some URL:
  • message value can be extracted using:
    • String split() method,
    • RegExp class,
    • built-in URL class,
    • some custom library.

 

More examples

Edit

In this section, you will find some example characters that must be encoded, and those that are not.

Alternative titles

  1. TypeScript - decodeURIComponent() function example
  2. TypeScript - decode URI component function example
1
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join