Hyperlink in feedback message

Hi, I want to put a url link in a feedback message and have it open in a new tab. If I put target=_blank into the line, it seems to get 'sanitized' before it gets to the client. Is there some way to override this sanitization?

Hi Daniel,

You can try this. It's working fine for me. Change code accordingly your requirements. 


"<a href='" + FileType + "' target='_blank'>" + "</a>"
"<a href='#'>"+Save.ErroMessage+"</a>"

-Hitesh-

Hi Daniel,

You may "get lucky", by going to ServiceCenter and, on the RichWidgets eSpace module, make sure the Site property FeedBackMessage_ForceHTMLEncode is set to False - this is the default value and changing it will have a global impact on all applications on your environment.

According to what I can see in the implementation, it will use the SanitizeHTML action that "Sanitizes the provided HTML using the OWASP Java HTML Sanitizer Project. The implemented policy follows the example in https://github.com/OWASP/java-html-sanitizer/blob/master/src/main/java/org/owasp/html/examples/EbayPolicyExample.java.". A quick check of that example seems to allow for at least some forms of anchor tags. 

Alternatively you could clone the RichWidgets module so you can copy the implementation of FeedbackMessage and make it your own, modifying its behaviour to suit your needs.

Hi Daniel McMechan

A suggestion here , I too had a scenario like this but instead if adding the link to feedback message, I created a popup web page for showing message and in the popup screen i added a expression and there i used my html . Please find the sample project in the attachment . I hope it might help.

Happy coding :)