How to decode/unescape/Special characters HTML in Dynamics AX 2012 / Dynamics 365 finance and operations
Views (566)
Below is the simple job I have created in D365 for removing encoded values from a string. Usually we see this kind of encoded special characters in the API's.
class SW_HTMLDecode
/// <summary>
/// Runs the class with the specified arguments.
/// </summary>
/// <param name = "_args">The specified arguments.</param>
public static void main(Args _args)
{
str input = ' HOME & GIFTS';
str output = System.Web.HttpUtility::HtmlDecode(input);
;
info(output);
}
}
Result = &
@Rahul
class SW_HTMLDecode
/// <summary>
/// Runs the class with the specified arguments.
/// </summary>
/// <param name = "_args">The specified arguments.</param>
public static void main(Args _args)
{
str input = ' HOME & GIFTS';
str output = System.Web.HttpUtility::HtmlDecode(input);
;
info(output);
}
}
Result = &
@Rahul
This was originally posted here.
*This post is locked for comments