Bug 309960

Summary: HTML in window titles not escaped in tabbox
Product: [Plasma] kwin Reporter: wrtlprnft
Component: tabboxAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal Flags: mgraesslin: ReviewRequest+
Priority: NOR    
Version: 4.9.2   
Target Milestone: 4.9.4   
Platform: Gentoo Packages   
OS: Linux   
URL: data:text/html,<i>Hi</i> <u>there</u>
Latest Commit: Version Fixed In: 4.9.4
Sentry Crash Report:

Description wrtlprnft 2012-11-12 13:17:16 UTC
When using alt-tab with windows whose title contains HTML tags, those tags are interpreted when displaying the window title in the tabbox.

See http://wrtlprnft.ath.cx/kwin_html.png for an example (I deleted ~/.kde* before taking this snapshot).

Reproducible: Always

Steps to Reproduce:
1. Point konqueror to the address data:text/html,<i>Hi</i> <u>there</u>
2. Press alt-tab, cycle through windows until the konqueror window is active
Actual Results:  
konqueror's title is displayed with formatting

Expected Results:  
the title should be displayed in the same way as it's displayed in the window's title bar.

This can obviously reproduced by other means than konqueror (konsole/xterm title, :set titletext in gvim, opening a file with angle brackets in its name, …).

Probably related to 293657
Comment 1 Martin Flöser 2012-11-12 17:26:14 UTC
quite related to the pointed out bug (that prevented me from googling for the solution - thanks) and easy to fix. Only problem is that I would prefer a general solution over fixing each of the QML files.
Comment 2 Martin Flöser 2012-11-23 07:38:50 UTC
https://git.reviewboard.kde.org/r/107431/
Comment 3 Martin Flöser 2012-11-27 19:56:53 UTC
Git commit d88a57be3885402e857140305ca0edbdbe4f7342 by Martin Gräßlin.
Committed on 23/11/2012 at 08:23.
Pushed by graesslin into branch 'KDE/4.9'.

Escape HTML command in window caption before passing to QML

Escaping is performed in the model instead of the UI as each of the QML
files needed to be fixed and it is likeley that the issue would come up
again. In the model it's hopefully fixed for good.
FIXED-IN: 4.9.4
REVIEW: 107431

M  +9    -2    kwin/tabbox/clientmodel.cpp

http://commits.kde.org/kde-workspace/d88a57be3885402e857140305ca0edbdbe4f7342
Comment 4 Martin Flöser 2012-11-27 19:57:34 UTC
Git commit 73fc361dfb05e6e76b29c43406a29d32b4991a8f by Martin Gräßlin.
Committed on 23/11/2012 at 08:23.
Pushed by graesslin into branch 'master'.

Escape HTML command in window caption before passing to QML

Escaping is performed in the model instead of the UI as each of the QML
files needed to be fixed and it is likeley that the issue would come up
again. In the model it's hopefully fixed for good.
FIXED-IN: 4.9.4
REVIEW: 107431

M  +9    -2    kwin/tabbox/clientmodel.cpp

http://commits.kde.org/kde-workspace/73fc361dfb05e6e76b29c43406a29d32b4991a8f