diff options
Diffstat (limited to 'akregator/src/librss/tools_p.cpp')
-rw-r--r-- | akregator/src/librss/tools_p.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/akregator/src/librss/tools_p.cpp b/akregator/src/librss/tools_p.cpp index 41996fd8f..e12bea883 100644 --- a/akregator/src/librss/tools_p.cpp +++ b/akregator/src/librss/tools_p.cpp @@ -43,11 +43,11 @@ TQString childNodesAsXML(const TQDomNode& parent) static TQString plainTextToHtml(const TQString& plainText) { TQString str(plainText); - str.replace("&", "&"); - str.replace("\"", """); - str.replace("<", "<"); - //str.replace(">", ">"); - str.replace("\n", "<br/>"); + str.tqreplace("&", "&"); + str.tqreplace("\"", """); + str.tqreplace("<", "<"); + //str.tqreplace(">", ">"); + str.tqreplace("\n", "<br/>"); return str; } @@ -84,7 +84,7 @@ static ContentFormat mapTypeToFormat(const TQString& modep, const TQString& type xmltypes.append(TQString::fromUtf8("application/xml-dtd")); - if (xmltypes.contains(type) + if (xmltypes.tqcontains(type) || type.endsWith(TQString::fromUtf8("+xml"), false) || type.endsWith(TQString::fromUtf8("/xml"), false)) return XML; @@ -102,7 +102,7 @@ static TQString extractAtomContent(const TQDomElement& e) { case HTML: { - const bool hasPre = e.text().contains( "<pre>", false ) || e.text().contains( "<pre ", false ); + const bool hasPre = e.text().tqcontains( "<pre>", false ) || e.text().tqcontains( "<pre ", false ); return KCharsets::resolveEntities( hasPre ? e.text() : e.text().simplifyWhiteSpace() ); } case Text: @@ -132,10 +132,10 @@ TQString extractNode(const TQDomNode &parent, const TQString &elemName, bool isI } else // check for HTML; not necessary for Atom:content { - bool hasPre = result.contains("<pre>", false) || result.contains("<pre ", false); - bool hasHtml = hasPre || result.contains("<"); // FIXME: test if we have html, should be more clever -> regexp + bool hasPre = result.tqcontains("<pre>", false) || result.tqcontains("<pre ", false); + bool hasHtml = hasPre || result.tqcontains("<"); // FIXME: test if we have html, should be more clever -> regexp if(!isInlined && !hasHtml) // perform nl2br if not a inline elt and it has no html elts - result = result = result.replace(TQChar('\n'), "<br />"); + result = result = result.tqreplace(TQChar('\n'), "<br />"); if(!hasPre) // strip white spaces if no <pre> result = result.simplifyWhiteSpace(); } @@ -145,13 +145,13 @@ TQString extractNode(const TQDomNode &parent, const TQString &elemName, bool isI TQString extractTitle(const TQDomNode & parent) { - TQDomNode node = parent.namedItem(TQString::fromLatin1("title")); + TQDomNode node = parent.namedItem(TQString::tqfromLatin1("title")); if (node.isNull()) return TQString::null; TQString result = node.toElement().text(); - result = KCharsets::resolveEntities(KCharsets::resolveEntities(result).replace(TQRegExp("<[^>]*>"), "").remove("\\")); + result = KCharsets::resolveEntities(KCharsets::resolveEntities(result).tqreplace(TQRegExp("<[^>]*>"), "").remove("\\")); result = result.simplifyWhiteSpace(); if (result.isEmpty()) @@ -177,7 +177,7 @@ static void authorFromString(const TQString& strp, TQString& name, TQString& ema { TQString all = remail.cap(0); email = remail.cap(1); - str.replace(all, ""); // remove mail address + str.tqreplace(all, ""); // remove mail address } // simplify the rest and use it as name |