I used the rich: editor component to enter rich content and I save it in a database. When I tried to display it in outputText field , rich tags are not interpreted and are displayed as simple text.
So my question is: how can I make the jsf component (or Richfaces) interpret this rich content and display it properly??
I used the rich: editor component to enter rich content and I save it
Share
The
h:outputTextindeed by default escapes predefined XML/HTML entities to avoid XSS attacks. If you want to display user-controlled input unescaped, then just set theescapeattribute tofalse.However, keep potential XSS attacks in mind. If the
rich:editorisn’t already sanitizing user input from XSS, then you can do this with help of among others Jsoup.