From 99cb0937e54340fa20c594aaa501276b8321cbf0 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 30 Nov 2022 22:08:00 +0100 Subject: Escape entities just before Pango rendering (#2382). Previously, text coming out of the player would have things like & escaped to &. 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. --- test/dcp_subtitle_test.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/dcp_subtitle_test.cc b/test/dcp_subtitle_test.cc index 20fbe5f1a..fe95cbbfc 100644 --- a/test/dcp_subtitle_test.cc +++ b/test/dcp_subtitle_test.cc @@ -140,7 +140,8 @@ BOOST_AUTO_TEST_CASE (dcp_subtitle_test2) stored = optional (); while (!decoder->pass()) { if (stored && stored->from() == ContentTime(0)) { - BOOST_CHECK_EQUAL (stored->subs.front().text(), "<b>Hello world!</b>"); + /* Text passed around by the player should be unescaped */ + BOOST_CHECK_EQUAL(stored->subs.front().text(), "Hello world!"); } } } -- cgit v1.2.3