[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/4.6/kdebase/runtime/kioslave/man
From: Martin Koller <kollix () aon ! at>
Date: 2011-01-05 22:29:58
Message-ID: 20110105222958.6F9073E1F1 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1212151 by mkoller:
Backport r1212148 by mkoller from trunk to the 4.6 branch:
CCBUG: 94095
trim white space around the given URL so that "man: bash " also shows the
bash man page.
Also use Qt's internal Qt::escape instead the self brewn one
M +3 -14 kio_man.cpp
--- branches/KDE/4.6/kdebase/runtime/kioslave/man/kio_man.cpp #1212150:1212151
@@ -29,6 +29,7 @@
#include <QDir>
#include <QFile>
#include <QTextStream>
+#include <QTextDocument>
#include <QMap>
#include <QRegExp>
#include <QTextCodec>
@@ -87,6 +88,7 @@
section.clear();
QString url = _url;
+ url = url.trimmed();
if (url.isEmpty() || url.at(0) == '/') {
if (url.isEmpty() || KStandardDirs::exists(url)) {
// man:/usr/share/man/man1/ls.1.gz is a valid file
@@ -447,19 +449,6 @@
}
#endif
-static QString text2html(const QString& txt)
-{
- QString reply = txt;
-
- reply = reply.replace('&', "&");
- reply = reply.replace('<', "<");
- reply = reply.replace('>', ">");
- reply = reply.replace('"', "&dquot;");
- reply = reply.replace('\'', """);
- return reply;
-}
-
-
void MANProtocol::get(const KUrl& url )
{
kDebug(7107) << "GET " << url.url();
@@ -495,7 +484,7 @@
"Check that you have typed the name using the correct upper and lower case characters.<br />"
"If everything looks correct, then you may need to improve the search path "
"for man pages; either using the environment variable MANPATH or using a matching file "
- "in the /etc directory.", text2html(title)));
+ "in the /etc directory.", Qt::escape(title)));
pageFound=false;
}
else if (foundPages.count()>1)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic