Forum Bugs

currency entity isnt render propderly

celene
if i have a markup like so
<span>500$pound;</span>

prince will render this like (when it generates pdf)
500£;

but if there's anyting between the currency entity name and the closing span tag then prince will not leave the ; when it renders the currency entity to symbols
mikeday
Did you mean &pound;?
celene
oops typo. yeah i meant &pound;,&euro; etc? it seems like if i do a js innerhtml update directly to a node then the ; are not encoded with the rest of the markup.

HTML before js update:
<span id="sampleID">some value that needs to be changed</span>


JS function that will be run before it goes to prince
var new_value = '500&pound;';

$( #sampleID ).html( new_value );

HTML after js update(this is what we'll feed prince):
<span id="sampleID">500&pound;</span>

result of generated pdf:
500£;

Edited by celene

mikeday
Thanks, it seems to be specific to innerHTML usage, we will investigate!
mikeday
Actually it affects entities at the end of the file too, that's just a very rare situation. Anyway, we have fixed the bug and the fix will be released shortly with Prince 12.1, thanks for letting us know! :)
mikeday
Prince 12.1 is available now with the HTML character entity parsing fix.