summaryrefslogtreecommitdiff
path: root/src/lib/render_text.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-08-01 02:02:28 +0200
committerCarl Hetherington <cth@carlh.net>2021-08-01 02:02:28 +0200
commit1a9554c281720d0bf54295ab16f593ccc0ef3b4e (patch)
tree5bbdcb49377a1e3e0832250c063563e13ac470e7 /src/lib/render_text.cc
parent2306f9cbc7086f6b51aa1cb55eb56b521fb92113 (diff)
Do all text -> HTML conversion for subtitles in the same place.
Previously we would convert > to &gt; then the ampersand to &amp; resulting in &amp;gt;
Diffstat (limited to 'src/lib/render_text.cc')
-rw-r--r--src/lib/render_text.cc6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/lib/render_text.cc b/src/lib/render_text.cc
index e47098ee9..7bb7d6b45 100644
--- a/src/lib/render_text.cc
+++ b/src/lib/render_text.cc
@@ -77,11 +77,7 @@ marked_up (list<StringText> subtitles, int target_height, float fade_factor)
/* Between 1-65535 inclusive, apparently... */
out += "alpha=\"" + dcp::raw_convert<string>(int(floor(fade_factor * 65534)) + 1) + "\" ";
out += "color=\"#" + i.colour().to_rgb_string() + "\">";
-
- string t = i.text();
- replace_all(t, "&", "&amp;");
- out += t;
-
+ out += i.text();
out += "</span>";
}