Skip to content

Instantly share code, notes, and snippets.

@ImkeF
Created August 1, 2023 20:51
Show Gist options
  • Save ImkeF/1c8ac8c4dfbf74f354e4f52496f03430 to your computer and use it in GitHub Desktop.
Save ImkeF/1c8ac8c4dfbf74f354e4f52496f03430 to your computer and use it in GitHub Desktop.
Decodes special characters in the input data according to the rules of RFC 3986.
let func =
(data as text) as text =>
let
DecodedText = Uri.Parts("http://contoso?a=" & data)[Query][a]
in
DecodedText ,
documentation = [
Documentation.Name = " Uri.UnescapeDataString ",
Documentation.Description = " Decodes special characters in the input data according to the rules of RFC 3986. ",
Documentation.LongDescription = " Decodes special characters in the input data according to the rules of RFC 3986. ",
Documentation.Category = " UriFunctions ",
Documentation.Source = " www.TheBIcountant.com . ",
Documentation.Version = " 1.0 ",
Documentation.Author = " Source: https://community.fabric.microsoft.com/t5/Desktop/How-to-convert-these-encode-url-to-normal-text/td-p/2388189 ",
Documentation.Examples = {[Description = " ",
Code = " Uri_UnescapeDataString(""Hello%20World"") ",
Result = " ""Hello World""
"]}]
in
Value.ReplaceType(func, Value.ReplaceMetadata(Value.Type(func), documentation))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment