diff --git a/tivo_commands.c b/tivo_commands.c
index 617d2f1..61e0a6e 100644
--- a/tivo_commands.c
+++ b/tivo_commands.c
@@ -123,6 +123,7 @@ tivo_unescape_tag(char *tag)
modifyString(tag, "<", "<", 1);
modifyString(tag, "&gt;", ">", 1);
modifyString(tag, ">", ">", 1);
+ modifyString(tag, """, """, 1);
return tag;
}
@@ -185,13 +186,8 @@ callback(void *args, int argc, char **argv, char **azColName)
episode = strstr(title, " - ");
if( episode )
{
- strcatf(str, "
%.*s"
- "%s",
- (int)(episode-title), title, episode+3);
- }
- else
- {
- strcatf(str, "%s", title);
+ strcatf(str, "%s", episode+3);
+ *episode = '\0';
}
if( date )
{
@@ -202,13 +198,13 @@ callback(void *args, int argc, char **argv, char **azColName)
strcatf(str, "0x%X", (unsigned int)mktime(&tm));
}
if( comment )
- strcatf(str, "%s", comment);
+ strcatf(str, "%s", tivo_unescape_tag(comment));
}
else
{
return 0;
}
- strcatf(str, "%s", tivo_unescape_tag(title));
+ strcatf(str, "%s", title);
if( artist ) {
strcatf(str, "%s", tivo_unescape_tag(artist));
}