Search code examples
htmljasper-reports

HTML does not show "<" symbol


I have a TextField in HTML with the value

<b> 1 > 0 and x <= 5 </b>

converting it to PDF with iReport it shows

<b> 1 > 0 and X = 5 </b> 

so the "<" symbol is missing, what might be the problem? Is it a bug?


Solution

  • You shouldn't use the symbols. Use the correct entity name instead. Those symbols are reserved for the HTML code and not for the "normal" use.

    < = &lt;
    

    and

    > = &gt;
    

    Here you will find these entity names.