Question
CGI
IN
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.
-
Likes (1)
vivek vardhan -
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
CGI
IN
Thanks for your response.
We have resolve the issue with "pzUnescapeHTMLSpecialChars" function.
Learning
IN
Hello RajaSekhar,
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:-
https://pdn.pega.com/community/product-support/question/how-remove-html-tags-text
Hope this helps.
Regards,
Hari
-
Brijesh Vanapalli Dhanalakshmi Ramakrishnan Purusoth Shanmugarajah
CGI
IN
Thanks it removes the HTML tags.
We are using Pega 7.2.1. Can please share how to write display format control in RD.
CGI
IN
We are using Pega 7.2.1. Can please share how to write display format control in RD
Truviq Systems Private Limited
IN
Hi,
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,
Srikanth.
Accepted Solution
CGI
IN
Thanks for your response.
We have resolve the issue with "pzUnescapeHTMLSpecialChars" function.
-
vivek vardhan Avanthi Anand
Virtusa
IN
Use RichTextDisplay Control to display the text in the format it was enterd.
Thanks,
Kiran
Chase
US
can you please explain more how did u use this - pzUnescapeHTMLSpecialChars
Pegasystems Inc.
US
You can look into the Formatter.pxFormatCommon function java code to see the usage of pzUnescapeHTMLSpecialChars function.
Chase
US
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
example
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.
Thanks,
Pegasystems Inc.
US
@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.