From de48618b152f366324fff339b279423e99be752f Mon Sep 17 00:00:00 2001 From: Leo Franchi Date: Sat, 8 Dec 2012 23:21:29 -0500 Subject: [PATCH] Do not double-escape &, and manually decode '+' to " " as QUrl won't --- src/libtomahawk/GlobalActionManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libtomahawk/GlobalActionManager.cpp b/src/libtomahawk/GlobalActionManager.cpp index e012f3069..e33f92526 100644 --- a/src/libtomahawk/GlobalActionManager.cpp +++ b/src/libtomahawk/GlobalActionManager.cpp @@ -309,6 +309,7 @@ GlobalActionManager::parseTomahawkLink( const QString& urlIn ) { QString cmd = url.mid( 11 ); cmd.replace( "%2B", "%20" ); + cmd.replace( "+", "%20" ); // QUrl doesn't parse '+' into " " tLog() << "Parsing tomahawk link command" << cmd; QString cmdType = cmd.split( "/" ).first(); @@ -1440,7 +1441,6 @@ GlobalActionManager::percentEncode( const QUrl& url ) const data.replace( "'", "%27" ); // QUrl doesn't encode ', which it doesn't have to. Some apps don't like ' though, and want %27. Both are valid. data.replace( "%20", "+" ); - data.replace( "&", "%26" ); return data; }