Check _inter_size in ::has_j2k() (fixes #2086).
[dcpomatic.git] / src / lib / text_decoder.cc
index 0a7bdf95da75ffc32f428d095929d8b891bb4b0d..6ee6ed079879e014c33df5c2c4bc36e79b336881 100644 (file)
@@ -72,10 +72,11 @@ void
 TextDecoder::emit_plain_start (ContentTime from, list<dcp::SubtitleString> s)
 {
        for (auto& i: s) {
-               /* We must escape < and > in strings, otherwise they might confuse our subtitle
-                  renderer (which uses some HTML-esque markup to do bold/italic etc.)
+               /* We must escape some things, otherwise they might confuse our subtitle
+                  renderer (which uses entities and some HTML-esque markup to do bold/italic etc.)
                */
                string t = i.text ();
+               boost::algorithm::replace_all (t, "&", "&amp;");
                boost::algorithm::replace_all (t, "<", "&lt;");
                boost::algorithm::replace_all (t, ">", "&gt;");
                i.set_text (t);