FilterRichText gives ASCII for special characters in HTML
Use of FilterRichText for a property and then display the property value gives ASCII values, instead of special characters( &, @, +, =).
Incorrect display of special characters
Steps to Reproduce
Configure a property for user entry and in the advanced tab use "pxFilterRichText" in Edit Input and display the same property value in the next screen(after submit of value), then it shows ASCII values when the special characters are entered.
Create a test activity and use "FilterRichtext" function with HTML text "[email protected]" as parameter to the function.
Use of FilterRichText for a property (either in the form of function usage or the edit input pxFilterRichText) and then display the property value gives ASCII values instead of special characters( &, @, +, =).
pxFilterRichText of FilterRichText is used to sanitize the HTML that is provided to it as input. Encoding/Decoding of special characters is not part of its functionality. Hence, as part of sanitization of HTML code passed, the function was converting the special characters to corresponding ASCII entity values.
In order to fulfil the requirement, perform below steps:
1. Perform Save As of “pzUnescapeHTMLSpecialChars” into required library in the application ruleset.
2. Add the highlighted part to the newly created function for the conversion of +, =, @ to its text. ( & is already included in the function for its text conversion)
3. Refer this function in one of the activities prior to the property display on UI and after use of FilterRichText, so that one can bring in the values of special characters that have converted to ASCII as part of sanitization in FilterRichText function execution.
4. Run the use case and observe that the values are displayed as required for the property.
5. Refer https://dev.w3.org/html5/html-author/charref to add more character reference entities to the function.