Currently in JSF, all HTML contained within a message (rich:messages
tag) is escaped and just shows up as the markup. For example, in my backing bean, 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 faces context and is then viewable in my rich:messages
tag.
When this message is created, my message simply shows up with the escaped HTML:
Title created successfully with product number: <a href="http://www.example.com">1234</a>.
Is there any way to avoid this and just provide an actual link in the message instead?
Thanks in advance
~Zack