diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2011-10-14 17:00:35 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2011-10-14 17:00:35 +0200 |
commit | 8893e39a048a68864770403e4b99feda67464d70 (patch) | |
tree | ce09e8888caebaa88ede5724fff72777e97adf6b /src/protocolhandler.cpp | |
parent | Fix crash on private mode store/restore (diff) | |
download | rekonq-8893e39a048a68864770403e4b99feda67464d70.tar.xz |
Sanitizing strings...
Diffstat (limited to 'src/protocolhandler.cpp')
-rw-r--r-- | src/protocolhandler.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/protocolhandler.cpp b/src/protocolhandler.cpp index 2af4214f..9bd029f2 100644 --- a/src/protocolhandler.cpp +++ b/src/protocolhandler.cpp @@ -55,6 +55,7 @@ // Qt Includes #include <QtNetwork/QNetworkRequest> #include <QtWebKit/QWebFrame> +#include <QTextDocument> static bool fileItemListLessThan(const KFileItem &s1, const KFileItem &s2) @@ -298,14 +299,14 @@ QString ProtocolHandler::dirHandling(const KFileItemList &list) Q_FOREACH(const KFileItem & item, orderedList) { msg += "<tr>"; - QString fullPath = item.url().prettyUrl(); + QString fullPath = Qt::escape(item.url().prettyUrl()); QString iconName = item.iconName(); QString icon = QString("file://") + KIconLoader::global()->iconPath(iconName, KIconLoader::Small); msg += "<td width=\"70%\">"; msg += "<img src=\"" + icon + "\" alt=\"" + iconName + "\" /> "; - msg += "<a href=\"" + fullPath + "\">" + item.name() + "</a>"; + msg += "<a href=\"" + fullPath + "\">" + Qt::escape(item.name()) + "</a>"; msg += "</td>"; msg += "<td align=\"right\">"; |