[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdepimlibs/syndication
From: Frank Osterfeld <frank.osterfeld () kdemail ! net>
Date: 2008-10-19 18:52:47
Message-ID: 1224442367.714256.27406.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 873588 by osterfeld:
Don't require the number of "<" match the number of ">" (">" can occurr unescaped)
Works both with the test suite and my personal feeds
BUG:172845
BUG:170318
BUG:168864
M +8 -6 tools.cpp
--- trunk/KDE/kdepimlibs/syndication/tools.cpp #873587:873588
@@ -150,8 +150,10 @@
return str.trimmed();
}
-static QRegExp tagRegExp;
-static bool tagRegExpSet = false;
+namespace {
+ static QRegExp tagRegExp;
+ static bool tagRegExpSet = false;
+}
bool stringContainsMarkup(const QString& str)
{
@@ -159,8 +161,8 @@
if (str.contains(QRegExp("&[a-zA-Z0-9#]+;")))
return true;
- int ltc = str.count('<');
- if (ltc == 0 || ltc != str.count('>'))
+ const int ltc = str.count('<');
+ if (ltc == 0)
return false;
if (!tagRegExpSet)
@@ -177,8 +179,8 @@
if (str.contains(QRegExp("&[a-zA-Z0-9#]+;")))
return true;
- int ltc = str.count('<');
- if (ltc == 0 || ltc != str.count('>'))
+ const int ltc = str.count('<');
+ if (ltc == 0)
return false;
if (!tagRegExpSet)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic