--- a/application/src/PodcastFeedView.cpp Sat Feb 27 14:40:44 2010 +0000
+++ b/application/src/PodcastFeedView.cpp Sat Feb 27 15:59:19 2010 +0000
@@ -119,11 +119,6 @@
iUpdater = CPodcastFeedViewUpdater::NewL(*this);
DP("CPodcastFeedView::ConstructL END");
-
- TBuf<1024> test;
- test.Copy(_L("Yeah, we’re doing an episode. "hej" © fl ong Should you get used to it? Ummm… maybe not. But let’s enjoy the ride while it lasts! Today we just yammer on about whatever, mostly just about what we’ve been up to. Until next time!"));
-
- PodcastUtils::CleanHtmlL(test);
}
CPodcastFeedView::~CPodcastFeedView()
--- a/engine/src/PodcastUtils.cpp Sat Feb 27 14:40:44 2010 +0000
+++ b/engine/src/PodcastUtils.cpp Sat Feb 27 15:59:19 2010 +0000
@@ -71,10 +71,9 @@
// miscellaneous cleanup
const TChar KLineBreak(CEditableText::ELineBreak);
_LIT(KNewLine, "\n");
- // ReplaceChar(str, '"', '\'');
+ _LIT(KNewLineWindows, "\r\n");
ReplaceString(str, KNewLine, KNullDesC);
- str.Trim();
-
+ ReplaceString(str, KNewLineWindows, KNullDesC);
// strip out HTML tags
@@ -198,6 +197,19 @@
}
CleanupStack::PopAndDestroy(tmpBuf);
+
+ // chop away newlines at start
+ while (str[0] == KLineBreak) {
+ str = str.Mid(1);
+ }
+
+ // chop away newlines at end
+
+ while (str[str.Length()-1] == KLineBreak) {
+ str = str.Left(str.Length()-1);
+ }
+
+ str.Trim();
}
EXPORT_C void PodcastUtils::RemoveAllFormatting(TDes & aString)