diff options
| author | mio <stigma@disroot.org> | 2025-03-14 19:50:48 +1000 |
|---|---|---|
| committer | mio <stigma@disroot.org> | 2025-03-23 10:00:18 +1000 |
| commit | 2649f82ae3155077b91e058053315482fe7fea8b (patch) | |
| tree | e95c54142071f9f7176de7df9ca00bb4a74f73b5 /akregator/src/librss/document.cpp | |
| parent | 8e7ad7ec143c483f913b3974890bd7fd1de1188d (diff) | |
| download | tdepim-2649f82ae3155077b91e058053315482fe7fea8b.tar.gz tdepim-2649f82ae3155077b91e058053315482fe7fea8b.zip | |
akregator-librss: use namespaces
Check element namespace rather than assuming a prefix, which can result
in incorrect metadata displaying.
Signed-off-by: mio <stigma@disroot.org>
(cherry picked from commit 81d428dedb2fa9f14ddef3edfa4d68c0d58af528)
Diffstat (limited to 'akregator/src/librss/document.cpp')
| -rw-r--r-- | akregator/src/librss/document.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/akregator/src/librss/document.cpp b/akregator/src/librss/document.cpp index 3bc64d00..7d94a252 100644 --- a/akregator/src/librss/document.cpp +++ b/akregator/src/librss/document.cpp @@ -224,7 +224,7 @@ Document::Document(const TQDomDocument &doc) : d(new Private) d->copyright = elemText; if (d->format == AtomFeed) - elemText = rootNode.toElement().attribute(TQString::fromLatin1("xml:lang"), TQString()); + elemText = rootNode.toElement().attributeNS(XMLNamespace, "lang", TQString::null); else elemText = extractNode(channelNode, TQString::fromLatin1("language")); @@ -441,7 +441,7 @@ Document::Document(const TQDomDocument &doc) : d(new Private) d->pubDate.setTime_t(_time); } - if (!(elemText = extractNode(channelNode, TQString::fromLatin1("dc:date"))).isNull()) { + if (!(elemText = extractElementTextNS(channelNode, DublinCoreNamespace, "date")).isNull()) { time_t _time = parseISO8601Date(elemText); /* \bug This isn't really the right way since it will set the date to * Jan 1 1970, 1:00:00 if the passed date was invalid; this means that |
