Last activity: 16 Oct 2018 12:03 EDT
How to remove HTML tags from string, while displaying in RD
We are using rich text editor control to capture input on UI. On clipboard and DB, it is storing values with HTML tags.
When we display in RD, it is displaying with HTML tags.
Query: How to display value without HTML tags.
Please share the steps and details
Thanks in Advance!
**Moderation Team has archived post**
This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.
Use Regular Expressions in custom java code to resolve this.
take the stream to a property and use this expression
@String.pxReplaceAllViaRegex(local.RemoveTags,"<(.|\n)*?>",""). This will replace all the tags with a space.
Kindly check the below URL for your reference:-
Hope this helps.
Thanks it removes the HTML tags.
We are using Pega 7.2.1. Can please share how to write display format control in RD.
We are using Pega 7.2.1. Can please share how to write display format control in RD
Truviq Systems Private Limited
We have an OOTB Function Alias pxReplace which can be used in Report Definition. It takes the input string and replaces the mentioned occurrences. Please find the image below. Just search for Replace in the function alias dropdown in Report Definition.
Hope this helps !
Thanks for your response.
We have resolve the issue with "pzUnescapeHTMLSpecialChars" function.
Sopra Steria AG
Use RichTextDisplay Control to display the text in the format it was enterd.
can you please explain more how did u use this - pzUnescapeHTMLSpecialChars
You can look into the Formatter.pxFormatCommon function java code to see the usage of pzUnescapeHTMLSpecialChars function.
thank for the update.
My issue is I am getting Jason response with some junk (escaped) data which I need to un-escape while presenting to user on UI
respjason_get.Property1 = "Indiv Bill/Corp Pay" this should be "Indiv Bill/Corp Pay"
respjason_get.Property2 = "Joint & Several" this should be "Joint & Several"
I tried using @(Pega-AppDefinition:Utilities).pzUnescapeHTMLSpecialChars(.Property1 ) but no use.
I need to update the OOTB for all incoming escapes, which is really very hard to anticipate the set of escape char sequence.
need some help on this.
@Venkat, this issue is not in the scope of this thread so i would suggest you to raise a new post with more details about your use case as its different issue. By the way if the data is passed correctly then it will be auto parsed correctly in UI.