[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdenetwork/librss
From: Stanislav Karchebny <berk () upnet ! ru>
Date: 2004-04-07 16:19:05
Message-ID: 20040407161905.2C0139A08 () office ! kde ! org
[Download RAW message or body]
CVS commit by karchebny:
* Make librss _really_ work.
Before, XML constructs like &lt;b&gt;test</b> would be incorrectly
processed to become <b>test</b>. The error resulted from QDom unescaping these
entities for us, and then librss doing that over again. The proper unescaping
would be <b>test</b>, which can be achieved by simply disabling decodeEntities
by default.
My proposal is to get rid of decodeEntities and boolean flag to extractNode \
altogether.
CCMAIL: raabe@kde.org
M +4 -0 tools_p.cpp 1.7
M +1 -1 tools_p.h 1.5
--- kdenetwork/librss/tools_p.cpp #1.6:1.7
@@ -16,7 +16,11 @@
#include <qdom.h>
+/* <berkus> frerich: please explain in what circumstances this function might be \
needed + and if there are none, i think its safe to just remove it \
altogether. +*/
QString RSS::decodeEntities(const QString &s)
{
QString result = s;
+ // btw: next line is wrong, all wrong (1st: & not & 2nd: QDom does it \
all for us)
result.replace(QString::fromLatin1("&"), QString::fromLatin1("&"));
for (int p = result.find(QString::fromLatin1("&")); p >= 0; p = \
result.find(QString::fromLatin1("&"), p)) {
--- kdenetwork/librss/tools_p.h #1.4:1.5
@@ -28,5 +28,5 @@ namespace RSS
QString decodeEntities(const QString &s);
- QString extractNode(const QDomNode &parent, const QString &elemName, bool \
entities = true); + QString extractNode(const QDomNode &parent, const QString \
&elemName, bool entities = false); }
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic