diff options
| author | Fabio D'Urso <[email protected]> | 2013-07-01 02:02:21 +0200 |
|---|---|---|
| committer | Fabio D'Urso <[email protected]> | 2013-07-29 11:21:55 +0200 |
| commit | 29013ed214e3682ce441765b6e295c16724ecf66 (patch) | |
| tree | a1ca4a726590a2b8f3b755bce963e463dcffd44c /src/dolphinpart.cpp | |
| parent | 15107c780ccc84d4c7bb33e674b519d692348746 (diff) | |
Don't let HTML-like filenames be interpreted as HTML strings
So that filenames that look like HTML don't get fancy-formatted when
we show info about them (i.e. on hover)
This patch fixes the same issue in two places:
- dolphin, by setting Qt::PlainText on the status bar's label
- konqueror, by escaping setStatusBarText strings emitted by
DolphinPart
BUG: 321778
FIXED-IN: 4.11.0
REVIEW: 111746
Diffstat (limited to 'src/dolphinpart.cpp')
| -rw-r--r-- | src/dolphinpart.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/dolphinpart.cpp b/src/dolphinpart.cpp index e8138eb8e..fc7b74dc0 100644 --- a/src/dolphinpart.cpp +++ b/src/dolphinpart.cpp @@ -58,6 +58,7 @@ #include <QApplication> #include <QClipboard> #include <QDir> +#include <QTextDocument> K_PLUGIN_FACTORY(DolphinPartFactory, registerPlugin<DolphinPart>();) K_EXPORT_PLUGIN(DolphinPartFactory("dolphinpart", "dolphin")) @@ -355,7 +356,8 @@ void DolphinPart::slotRequestItemInfo(const KFileItem& item) if (item.isNull()) { updateStatusBar(); } else { - ReadOnlyPart::setStatusBarText(item.getStatusBarInfo()); + const QString escapedText = Qt::escape(item.getStatusBarInfo()); + ReadOnlyPart::setStatusBarText(QString("<qt>%1</qt>").arg(escapedText)); } } |
