# HG changeset patch # User teknolog # Date 1267295456 0 # Node ID 420a1b4930da016c37d04d0974cd6e20d20d9be7 # Parent c92d8384952c5f08d2356cb8e4918b3d4586714d SQLEncoding for showinfo added diff -r c92d8384952c -r 420a1b4930da application/sis/podcatcher_udeb.sis Binary file application/sis/podcatcher_udeb.sis has changed diff -r c92d8384952c -r 420a1b4930da application/sis/podcatcher_udeb_signed.sis Binary file application/sis/podcatcher_udeb_signed.sis has changed diff -r c92d8384952c -r 420a1b4930da application/sis/podcatcher_urel.sis Binary file application/sis/podcatcher_urel.sis has changed diff -r c92d8384952c -r 420a1b4930da application/sis/podcatcher_urel_signed.sis Binary file application/sis/podcatcher_urel_signed.sis has changed diff -r c92d8384952c -r 420a1b4930da engine/src/PodcastUtils.cpp --- a/engine/src/PodcastUtils.cpp Sat Feb 27 16:41:36 2010 +0000 +++ b/engine/src/PodcastUtils.cpp Sat Feb 27 18:30:56 2010 +0000 @@ -68,6 +68,12 @@ EXPORT_C void PodcastUtils::CleanHtmlL(TDes &str) { + + if (str.Length() == 0) + { + return; + } + // miscellaneous cleanup const TChar KLineBreak(CEditableText::ELineBreak); _LIT(KNewLine, "\n"); diff -r c92d8384952c -r 420a1b4930da engine/src/ShowEngine.cpp --- a/engine/src/ShowEngine.cpp Sat Feb 27 16:41:36 2010 +0000 +++ b/engine/src/ShowEngine.cpp Sat Feb 27 18:30:56 2010 +0000 @@ -737,14 +737,28 @@ { DP2("CShowEngine::DBAddShow, title=%S, URL=%S", &aItem.Title(), &aItem.Url()); + HBufC* titleBuf = HBufC::NewLC(KMaxLineLength); + TPtr titlePtr(titleBuf->Des()); + titlePtr.Copy(aItem.Title()); + PodcastUtils::SQLEncode(titlePtr); + + HBufC* descBuf = HBufC::NewLC(KMaxLineLength); + TPtr descPtr(descBuf->Des()); + descPtr.Copy(aItem.Description()); + PodcastUtils::SQLEncode(descPtr); + _LIT(KSqlStatement, "insert into shows (url, title, description, filename, position, playtime, playstate, downloadstate, feeduid, uid, showsize, trackno, pubdate, showtype)" " values (\"%S\",\"%S\", \"%S\", \"%S\", \"%Lu\", \"%u\", \"%u\", \"%u\", \"%u\", \"%u\", \"%u\", \"%u\", \"%Lu\", \"%d\")"); - iSqlBuffer.Format(KSqlStatement, &aItem.Url(), &aItem.Title(), &aItem.Description(), + + iSqlBuffer.Format(KSqlStatement, &aItem.Url(), &titlePtr, &descPtr, &aItem.FileName(), aItem.Position().Int64(), aItem.PlayTime(), aItem.PlayState(), aItem.DownloadState(), aItem.FeedUid(), aItem.Uid(), aItem.ShowSize(), aItem.TrackNo(), aItem.PubDate().Int64(), aItem.ShowType()); + CleanupStack::PopAndDestroy(descBuf); + CleanupStack::PopAndDestroy(titleBuf); + sqlite3_stmt *st; int rc = sqlite3_prepare16_v2(&iDB, (const void*) iSqlBuffer.PtrZ(), -1,