* Strip HTML-tags from the external text file subtitles.
Properly supporting showing subtitles with HTML-tags would
require a "rich text" widget of some kind, for example,
through wrapping the QSimpleRichText widget in the OSDType
interface. I might do that as soon as I figure out the
easiest way to draw a Qt widget on MythTV OSDSurface.
Index: mythtv/libs/libmythtv/osd.cpp
===================================================================
--- mythtv.orig/libs/libmythtv/osd.cpp 2006-10-22 16:26:21.000000000 +0300
+++ mythtv/libs/libmythtv/osd.cpp 2006-10-22 16:46:10.000000000 +0300
@@ -312,7 +312,16 @@
QStringList::const_iterator it = lines.begin();
for (; it != lines.end(); ++it)
{
- const QString line = *it;
+ QString line = *it;
+
+ // Strip HTML-tags from the subtitle.
+ // Properly supporting showing subtitles with HTML-tags would
+ // require a "rich text" widget of some kind, for example,
+ // through wrapping the QSimpleRichText widget in the OSDType
+ // interface. --PJ
+ QRegExp htmlTagRE = QRegExp("?.+>");
+ htmlTagRE.setMinimal(true);
+ line.replace(htmlTagRE, "");
if (line.length() <= MAX_CHARACTERS_PER_ROW)
{