From kde-commits Sun Feb 07 12:03:01 2010 From: Frank Osterfeld Date: Sun, 07 Feb 2010 12:03:01 +0000 To: kde-commits Subject: KDE/kdepim/akregator/src Message-Id: <1265544181.349092.9928.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=126554420012861 SVN commit 1086454 by osterfeld: forwardport SVN commit 1086321 by osterfeld: strip HTML in titles, don't escape it. BUG:211937 M +12 -9 articleformatter.cpp --- trunk/KDE/kdepim/akregator/src/articleformatter.cpp #1086453:1086454 @@ -101,9 +101,9 @@ virtual bool visitFeed(Feed* node) { text = QString("
\n").arg(QApplication::isRightToLeft() ? "rtl" : "ltr"); - - text += QString("
").arg(Utils::directionOf(Utils::stripTags(node->title()))); - text += node->title(); + const QString strippedTitle = Utils::stripTags(node->title()); + text += QString("
").arg(Utils::directionOf(strippedTitle)); + text += strippedTitle; if(node->unread() == 0) text += i18n(" (no unread articles)"); else @@ -173,12 +173,13 @@ text = QString("
\n").arg(QApplication::isRightToLeft() ? "rtl" : "ltr"); const QString enc = formatEnclosure( *article.enclosure() ); - if (!article.title().isEmpty()) + const QString strippedTitle = Utils::stripTags( article.title() ); + if (!strippedTitle.isEmpty()) { - text += QString("
\n").arg(Utils::directionOf(Utils::stripTags(article.title()))); + text += QString("\n"; @@ -367,12 +368,14 @@ const QString enc = formatEnclosure( *article.enclosure() ); text = QString("
\n").arg(QApplication::isRightToLeft() ? "rtl" : "ltr"); - if (!article.title().isEmpty()) + const QString strippedTitle = Utils::stripTags( article.title() ); + + if (!strippedTitle.isEmpty()) { - text += QString("
\n").arg(Utils::directionOf(Utils::stripTags(article.title()))); + text += QString("\n";