Official Content

Converts special characters that are encoded in a URL back to their original form.

Syntax

urlDecode(CharacterExpression)

Where: 

CharacterExpression
     
Attribute, variable, constant, or character expression that contains/provides the encoded URL to be decoded. It must be based on the Character, Varchar, or LongVarchar data type.

Type Returned:
Character

Scope

Generator: .NET, .NET Framework, Java

Description

A URL may contain special characters such as spaces, punctuation marks, and other non-alphanumeric characters. These special characters are encoded, the urlDecode function takes a string corresponding to an encoded URL and decodes it, converting it back to its original form. For example, the "%20" becomes a space and the "%2C" becomes a comma.

Samples

&EncodedUrl="https://www.example.com/search?query=my%20search%20term"
&DecodedUrl = urlDecode(&EncodedUrl) //The returned value is "https://www.example.com/search?query=my search term"

Availability

This function is available since GeneXus 18 Upgrade 9.

See Also

urlEncoded function

 

Last update: April 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant