1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-20 07:49:42 +01:00

Do not double-escape &, and manually decode '+' to " " as QUrl won't

This commit is contained in:
Leo Franchi 2012-12-08 23:21:29 -05:00
parent f359e60b2a
commit de48618b15

View File

@ -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;
}