Currently, in JSF, all HTML contained in a message (tag rich:messages) is escaped and displayed only as markup. For example, in my bean support, I have:
createMessage("Title created successfully with product number: <a href=\"http://www.example.com\">" + product.getProductNumber() + "</a>.");
where createMessage()is just a helper function that adds a new message to the face context and is then viewed in the tag rich:messages.
When this message is created, my message simply appears with escaped HTML:
Title created successfully with product number: <a href="http://www.example.com">1234</a>.
Is there a way to avoid this and just provide the actual link in the message instead?
Thank you in advance
~ Zack
source
share