Forum Bugs

The word "Bank&interest" is converted to Bank∫erest using function convert_string_to_file to convert HTML into pdf

skuswaha
hi
The word "Bank&interest" is converted to Bank∫erest using function convert_string_to_file to convert HTML into pdf

I think it is converting the &int into ∫ as the function is taking the word &int as html entities instead it should print &interest because i am using the work &interest without any space.

Please suggest workaround.
mikeday
The simplest workaround is to escape the ampersand as &
skuswaha
Hi mikeday,
could you please tell why it is treating the &interest as &int and leaving the other letters, it should not take that since it is whole word "&interest" instead of "&int"

Is that a issue in prince 13.5 version
skuswaha
We are passing the words by converting it into html entities.
mikeday
I think this is a bug in the Prince HTML parser, but in general escaping & as &amp; and < as &lt; is the safest approach for embedding text in HTML.
skuswaha
It is working with your suggested workaround, thanks mikeday.
skuswaha
Hey, It is not working for space , instead to adding space it is showing &nbsp; in pdf
mikeday
Please clarify what is the exact HTML input?
skuswaha
This the sample HTML

<tr class="sub-row">
<td class=" align-right" style="padding-left:8px">Test Fixed Assets</td>
<td class=" align-right" style="padding-left:8px">Bank&interest</td>
<td class="bold align-right">(14.00)</td>
<td class="bold align-right">0.00&nbsp;</td>
<td class="bold align-right">(14.00)</td>
<td class="bold align-right">0.00%</td>
</tr>
mikeday
Have you perhaps double-escaped it as "&amp;nbsp;"?
mikeday
We have fixed the "Bank&Interest" character reference issue in the latest builds, although I would still recommend correctly escaping ampersand characters in your text as other character references like "&not" do not require a semicolon and may lead to unexpected substitutions.