summaryrefslogtreecommitdiff
path: root/menu_whatson.c
diff options
context:
space:
mode:
authorChristian Wieninger <cwieninger (at) gmx (dot) de>2008-02-26 18:45:03 +0100
committerChristian Wieninger <cwieninger (at) gmx (dot) de>2008-02-26 18:45:03 +0100
commitb24ed2965c33dbe8c528d50999dfe661836b6f61 (patch)
tree243c84827e5d9d396946fd8ca609c90e25b0894f /menu_whatson.c
parent6e7251f318502aca14c674fa8af40be3b7fe19e0 (diff)
downloadvdr-plugin-epgsearch-b24ed2965c33dbe8c528d50999dfe661836b6f61.tar.gz
vdr-plugin-epgsearch-b24ed2965c33dbe8c528d50999dfe661836b6f61.tar.bz2
fixed a bug in menu item display, when a title contains ? and :
Diffstat (limited to 'menu_whatson.c')
-rw-r--r--menu_whatson.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/menu_whatson.c b/menu_whatson.c
index b8f6701..a620251 100644
--- a/menu_whatson.c
+++ b/menu_whatson.c
@@ -158,7 +158,13 @@ bool cMenuMyScheduleItem::Update(bool Force)
char* buffer = strdup(menutemplate);
strreplace(buffer, '|', '\t');
- buffer = strreplacei(buffer, "%title%", event?event->Title():tr(">>> no info! <<<"));
+ char* title = NULL;
+ msprintf(&title, "%s", event?event->Title():tr(">>> no info! <<<"));
+ title = strreplacei(title, ":", "%colon%"); // asume a title has the form "a?b:c",
+ // we need to replace the colon to avoid misinterpretation the expression as a condition
+ buffer = strreplacei(buffer, "%title%", title);
+ free(title);
+
if (channel)
{
char szChannelNr[6] = "";
@@ -182,6 +188,7 @@ bool cMenuMyScheduleItem::Update(bool Force)
buffer = strreplacei(buffer, "$r_status$", r);
+
buffer = FixSeparators(buffer, '~');
buffer = FixSeparators(buffer, ':');
buffer = FixSeparators(buffer, '-');