mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-07-31 11:20:22 +02:00
correctly escape newline
This commit is contained in:
@@ -186,13 +186,13 @@ SnoreNotifyPlugin::nowPlaying( const QVariant& input )
|
|||||||
// Remark: If using xml-based markup in notifications, the supplied strings need to be escaped.
|
// Remark: If using xml-based markup in notifications, the supplied strings need to be escaped.
|
||||||
QString album;
|
QString album;
|
||||||
if ( !hash[ "album" ].isEmpty() )
|
if ( !hash[ "album" ].isEmpty() )
|
||||||
album = QString( "\n<i>%1</i> %2" ).arg( tr( "on", "'on' is followed by an album name" ) ).arg( Qt::escape( hash[ "album" ] ) );
|
album = QString( "<br><i>%1</i> %2" ).arg( tr( "on", "'on' is followed by an album name" ) ).arg( Qt::escape( hash[ "album" ] ) );
|
||||||
|
|
||||||
messageText = tr( "%1%4 %2%3.", "%1 is a title, %2 is an artist and %3 is replaced by either the previous message or nothing, %4 is the preposition used to link track and artist ('by' in english)" )
|
messageText = tr( "%1%4 %2%3.", "%1 is a title, %2 is an artist and %3 is replaced by either the previous message or nothing, %4 is the preposition used to link track and artist ('by' in english)" )
|
||||||
.arg( Qt::escape( hash[ "title" ] ) )
|
.arg( Qt::escape( hash[ "title" ] ) )
|
||||||
.arg( Qt::escape( hash[ "artist" ] ) )
|
.arg( Qt::escape( hash[ "artist" ] ) )
|
||||||
.arg( album )
|
.arg( album )
|
||||||
.arg( QString( "\n<i>%1</i>" ).arg( tr( "by", "preposition to link track and artist" ) ) );
|
.arg( QString( "<br><i>%1</i>" ).arg( tr( "by", "preposition to link track and artist" ) ) );
|
||||||
|
|
||||||
// Dirty hack(TM) so that KNotify/QLabel recognizes the message as Rich Text
|
// Dirty hack(TM) so that KNotify/QLabel recognizes the message as Rich Text
|
||||||
messageText = QString( "<i></i>%1" ).arg( messageText );
|
messageText = QString( "<i></i>%1" ).arg( messageText );
|
||||||
|
Reference in New Issue
Block a user