christopher-ramirez/secretary

HTML unescaping only replaces first ocurrance of HTML codes and does not handle & or "

DieterBuysAI opened this issue · 1 comments

The helper method _unescape_entities(xml_text) does not handle HTML codes & or ". Unfortunately this precludes some useful template values such as {{ date.strftime("%Y-%m-%d") }}. In addition, any expression that involves more than one instance of escaped characters would also fail due to the regular expression substitution being performed only once.

Thank for reporting this Dieter. I believe this issue is related to issue #16. So I will close the later and let's continue discussion over this one.

Indeed I've found issues on _unescape_entities function. Using PR #15 maybe we could implement a fix.