Don't let HTML-like filenames be interpreted as HTML strings

Review Request #111746 - Created July 28, 2013 and submitted

Fabio D'Urso
dfaure, freininghaus
The attached diff fixes the same issue in two places: filenames looking like HTML (eg "<html>H<font color=red>ello") are displayed as if they were HTML strings on hover in the status bar, both in dolphin and in konqueror (see attached screenshot).

Note that the status bar text is handled in different ways:

The dolphin/src/statusbar/dolphinstatusbar.cpp change fixes the dolphin case. In dolphin, the status bar text is directly set by DolphinViewContainer::showItemInfo. This patch just configures dolphin's statusbar to use Qt::PlainText.

In konqueror, instead, the status bar text comes from DolphinPart::slotRequestItemInfo, which emits the KPart's setStatusBarText signal. The attached patch fixes the issue by escaping the string before emitting it.
I have a doubt about this, and this is the reason why I'm involving dfaure: is setStatusBarText actually supposed to carry HTML data? Konqueror interprets setStatusBarText's text as HTML, if it starts with "<qt>" or "<html>" (KonqStatusBarMessageLabel::Private::isRichText).




  • 0
  • 0
  • 1
  • 1
Description From Last Updated
Fabio D'Urso
David Faure
Dawit Alemayehu
Commit Hook
Fabio D'Urso
Review request changed

Status: Closed (submitted)