summaryrefslogtreecommitdiff
path: root/epg.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2012-01-08 15:40:17 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2012-01-08 15:40:17 +0100
commit4d3003393602e8870e9139bfe290a85690f985c8 (patch)
tree06ff5bb00194dfcaad38deb5e0db5dcc7d7e02a2 /epg.c
parent2b3821cc88e3caf087ec10246d9e9239270d3c60 (diff)
downloadvdr-4d3003393602e8870e9139bfe290a85690f985c8.tar.gz
vdr-4d3003393602e8870e9139bfe290a85690f985c8.tar.bz2
cEvent::FixEpgBugs() now replaces any newline characters in stream component descriptions with blanks
Diffstat (limited to 'epg.c')
-rw-r--r--epg.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/epg.c b/epg.c
index c2d1783d..e1e317d5 100644
--- a/epg.c
+++ b/epg.c
@@ -7,7 +7,7 @@
* Original version (as used in VDR before 1.3.0) written by
* Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>.
*
- * $Id: epg.c 2.7 2011/02/25 15:16:05 kls Exp $
+ * $Id: epg.c 2.8 2012/01/08 14:59:38 kls Exp $
*/
#include "epg.h"
@@ -828,10 +828,17 @@ void cEvent::FixEpgBugs(void)
Final:
- // VDR can't usefully handle newline characters in the title and shortText of EPG
+ // VDR can't usefully handle newline characters in the title, shortText or component description of EPG
// data, so let's always convert them to blanks (independent of the setting of EPGBugfixLevel):
strreplace(title, '\n', ' ');
strreplace(shortText, '\n', ' ');
+ if (components) {
+ for (int i = 0; i < components->NumComponents(); i++) {
+ tComponent *p = components->Component(i);
+ if (p->description)
+ strreplace(p->description, '\n', ' ');
+ }
+ }
/* TODO adapt to UTF-8
// Same for control characters:
strreplace(title, '\x86', ' ');