Escape entities just before Pango rendering (#2382). v2.16.35
authorCarl Hetherington <cth@carlh.net>
Wed, 30 Nov 2022 21:08:00 +0000 (22:08 +0100)
committerCarl Hetherington <cth@carlh.net>
Thu, 1 Dec 2022 08:21:38 +0000 (09:21 +0100)
commit99cb0937e54340fa20c594aaa501276b8321cbf0
tree2528f0ad27d870c33c76d0cb11892c81f1ab3a69
parentefb1172f51bbe15cd1f90b25a032bbe858453f5f
Escape entities just before Pango rendering (#2382).

Previously, text coming out of the player would have things like
& escaped to &amp;.  This escaping is also done by libxml++ when
writing XML, so doing it in the player would mean it was done
twice.

We do, however, need to escape things before passing them to Pango
as otherwise it gives errors and renders nothing for the line.

Here we move the escaping to just before the rendering, meaning
that in the reset of DoM we should pass unescaped strings around.
src/lib/render_text.cc
src/lib/text_decoder.cc
test/dcp_subtitle_test.cc