DECODEURL$: Difference between revisions

From QB64 Phoenix Edition Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 13: Line 13:
{{PageDescription}}
{{PageDescription}}
* URL decoding may be required when parsing [[Downloading Files|downloaded files]] for additional links and retrieving its addresses.
* URL decoding may be required when parsing [[Downloading Files|downloaded files]] for additional links and retrieving its addresses.
* As it is possible, although not recommended, that a URL was encoded multiple times, this function can be called multiple times too until all encoded chars are resolved again, i.e. until no more percent (%) chars with a following 2 digit hex number exist in the URL.
* It is safe to call this function with an unencoded URL, it will be simply returned as is.
* It is safe to call this fucntion with an unencoded URL, it will be simply returned as is.
* As it is possible, although not recommended, that a URL was encoded multiple times, this function can be called multiple times too until all encoded chars are resolved again, i.e. until the the given URL is returned unchanged as is.
* Note that this function performs no validation of the given URL, it expects a valid URL to be given and just does the decoding.
* Note that this function performs no validation of the given URL, it expects a valid URL to be given and just does the decoding.



Latest revision as of 17:28, 13 December 2024

The _DECODEURL$ function is the counterpart for _ENCODEURL$, it returns the decoded plain text URL of the given encoded URL.


Syntax

result$ = _DECODEURL$(url$)


Parameters

  • url$ is the URL to decode as variable or literal STRING.


Description

  • URL decoding may be required when parsing downloaded files for additional links and retrieving its addresses.
  • It is safe to call this function with an unencoded URL, it will be simply returned as is.
  • As it is possible, although not recommended, that a URL was encoded multiple times, this function can be called multiple times too until all encoded chars are resolved again, i.e. until the the given URL is returned unchanged as is.
  • Note that this function performs no validation of the given URL, it expects a valid URL to be given and just does the decoding.


Availability


See also



Navigation:
Main Page with Articles and Tutorials
Keyword Reference - Alphabetical
Keyword Reference - By usage
Report a broken link