diff -r 1cae65a87b5e -r 9c56bf585696 engine/src/PodcastUtils.cpp --- a/engine/src/PodcastUtils.cpp Sat Oct 23 17:30:22 2010 +0100 +++ b/engine/src/PodcastUtils.cpp Sat Nov 13 13:54:36 2010 +0000 @@ -73,18 +73,16 @@ { return; } - - DP(" miscellaneous"); // miscellaneous cleanup + DP(" miscellaneous cleanup"); const TChar KLineBreak(CEditableText::ELineBreak); _LIT(KNewLine, "\n"); _LIT(KNewLineWindows, "\r\n"); ReplaceString(str, KNewLine, KNullDesC); ReplaceString(str, KNewLineWindows, KNullDesC); - DP(" strip HTML"); // strip out HTML tags - + DP(" strip out HTML tags"); TInt startPos = str.Locate('<'); TInt endPos = str.Locate('>'); HBufC* tmpBuf = HBufC::NewLC(KMaxDescriptionLength); @@ -116,8 +114,8 @@ endPos = str.Locate('>'); } +// change HTML encoded chars to unicode DP(" change HTML encoded chars to unicode"); -// change HTML encoded chars to unicode startPos = str.Locate('&'); endPos = str.Locate(';'); while (startPos != KErrNotFound && endPos != KErrNotFound && endPos > startPos) @@ -207,20 +205,17 @@ CleanupStack::PopAndDestroy(tmpBuf); - DP(" trim"); if(str.Length()>1) { - DP1("str.Length() ==%d", str.Length()); // chop away newlines at start - while (str.Length() && (str[0] == KLineBreak)) { - DP("mid"); + DP(" chop away newlines at start"); + while (str.Length() > 0 && (str[0] == KLineBreak)) { str = str.Mid(1); } // chop away newlines at end - - while (str.Length() && (str[str.Length()-1] == KLineBreak)) { - DP("left"); + DP(" chop away newlines at end"); + while (str.Length() > 0 && (str[str.Length()-1] == KLineBreak)) { str = str.Left(str.Length()-1); }