Html escape codes not expanded in lists

merlinsilk wrote on Sunday, October 16, 2016:

For risk factor evaluation I made a from with xmlformgen so I can not use < or > in the labels as this will blow up the generator that that creates the form from the xml file. So I entered the html escape characters < and > instead and could create the forms and the escaped charactes appear in the database in the list options.

But now, and this is the actual problem, when the list is displayed in the form the excape characters are not shown as the symbols < and >.
Here is a picture…

merlinsilk wrote on Sunday, October 16, 2016:

visolveemr wrote on Wednesday, October 19, 2016:

Hello Merlin,

Greetings from Visolve Inc.

We reproduced this issue and resolved the same in openemr 4.2.2 version. If you are using the same version please download the attachment and replace with the following location.

library/options.inc.php

Thanks,
OpenEMR Customization/Support Team,
Visolve Inc

merlinsilk wrote on Tuesday, November 22, 2016:

Hi ViSolve,

thank you for looking into this and sorry to notice so late (was just to busy with another project).
Now, I did copy your file over and tried, but it looks like we need that html_entity_decode function in more places.
When I use the xml generator to create my form, and I have the html entities in the xml file, what I end up with is a table.sql file for that form that contains the html entity, like

INSERT IGNORE INTO list_options SET list_id=‘list_1’,
option_id=‘l0103’,
title=‘History of prior minor surgery (< 1 month)’,
seq=‘3’;

and this string with the html entity ends up in the database and thus in a list under Administradtion >> Lists. Html entities in list items are still not expanded - but I am sure you know immediately where to look, right? :slight_smile:

Cheers,
Merlin