Commit 5b2f2ecd authored by Scott Wheeler's avatar Scott Wheeler

Properly escape text before showing it in the track announcement popup.

BUG:91751

svn path=/trunk/kdemultimedia/juk/; revision=356237
parent 506b76c4
......@@ -31,6 +31,7 @@
#include <qtooltip.h>
#include <qpainter.h>
#include <qvaluevector.h>
#include <qstylesheet.h>
#include <netwm.h>
......@@ -296,15 +297,17 @@ void SystemTray::createPopup()
int labelCount = 0;
m_labels[labelCount++]->setText(QString("<nobr><h2>%1</h2></nobr>").arg(playingInfo->title()));
QString title = QStyleSheet::escape(playingInfo->title());
m_labels[labelCount++]->setText(QString("<qt><nobr><h2>%1</h2></nobr><qt>").arg(title));
if(!playingInfo->artist().isEmpty())
m_labels[labelCount++]->setText(playingInfo->artist());
if(!playingInfo->album().isEmpty()) {
QString album = QStyleSheet::escape(playingInfo->album());
QString s = playingInfo->year() > 0
? QString("%1 (%2)").arg(playingInfo->album()).arg(playingInfo->year())
: playingInfo->album();
? QString("%1 (%2)").arg(album).arg(playingInfo->year())
: album;
m_labels[labelCount++]->setText(s);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment