Escape HTML tags in window caption in Aurorae and Killer
The unescaped tags are interpreted as HTML by Aurorae decorations and the KWin killer. Escaping the tags ensures that the text is not rendered incorrectly. BUG: 293657 FIXED-IN: 4.9.0 REVIEW: 104989
This commit is contained in:
parent
4643b59b0f
commit
ea8db29c2b
2 changed files with 6 additions and 0 deletions
|
@ -151,6 +151,7 @@ Decoration {
|
|||
Text {
|
||||
id: caption
|
||||
text: decoration.caption
|
||||
textFormat: Text.PlainText
|
||||
horizontalAlignment: auroraeTheme.horizontalAlignment
|
||||
verticalAlignment: auroraeTheme.verticalAlignment
|
||||
elide: Text.ElideRight
|
||||
|
|
|
@ -32,6 +32,8 @@ DEALINGS IN THE SOFTWARE.
|
|||
#include <X11/Xlib.h>
|
||||
#include <QX11Info>
|
||||
#include <QProcess>
|
||||
// TODO: remove with Qt 5, only for HTML escaping the caption
|
||||
#include <QTextDocument>
|
||||
#include <signal.h>
|
||||
#include <errno.h>
|
||||
|
||||
|
@ -66,6 +68,9 @@ int main(int argc, char* argv[])
|
|||
KCmdLineArgs::usageError(i18n("This helper utility is not supposed to be called directly."));
|
||||
return 1;
|
||||
}
|
||||
if (Qt::mightBeRichText(caption)) {
|
||||
caption = Qt::escape(caption);
|
||||
}
|
||||
QString question = i18n(
|
||||
"<p>The window \"<b>%2</b>\" is not responding. "
|
||||
"It belongs to the application <b>%1</b> (Process ID = %3, hostname = %4).</p>"
|
||||
|
|
Loading…
Reference in a new issue