6 Replies Latest reply on Oct 31, 2008 11:11 PM by Chris Cheng

    Displaying HTML bad formatted text in PDF

    Chris Cheng Newbie

      Hi all,


      Is there a possibility to display a bad HTML-formatted text in the PDF generation?  Since the value of myBean.text was input from a user, it breaks the display of the PDF when they input bad html.


      For example:


      <p:paragraph>
      <p:html>
      <h:outputText value="#{myBean.text}" escape="false"/>
       </p:html>
      </p:paragraph>





      User input like the following without <ul> and </ul> in myBean.text:
      <li>Advanced web design solutions</li>
      <li>Web standard compliance</li>
      <li>Introduction to server-side scripting with PHP</li>





      The below is the exception what I am getting:


      Exception during request processing:
      Caused by javax.servlet.ServletException with message: "Insertion of illegal Element: 15" 




      Thanks,
      Chris