innerhippy
15th November 2008, 15:50
Greetings
It seems that QDesktopServices is having problems launching urls and does some incorrect sanitizing of the url.
The following 2 calls should give the same results:
QUrl url ("http://www.example.com/longpathwith%3Dcharacters");
system(qPrintable(QString("firefox http://%1%2").arg(url.host()).arg(url.path())));
QDesktopServices::openUrl(url);
The system call works fine, launching firefox successfully.
The call to QDesktopServices launches firefox with an invalid url. The address bar indicates that "%3D" has been replaced with "%253D".
The documentation states:
Any occurrences of a percent character "%" not followed by exactly two hexadecimal characters (e.g., "13% coverage.html") will be replaced by "%25".
Which would suggest that %3D should work.
Any idea what's going on - a bugette perhaps?
It seems that QDesktopServices is having problems launching urls and does some incorrect sanitizing of the url.
The following 2 calls should give the same results:
QUrl url ("http://www.example.com/longpathwith%3Dcharacters");
system(qPrintable(QString("firefox http://%1%2").arg(url.host()).arg(url.path())));
QDesktopServices::openUrl(url);
The system call works fine, launching firefox successfully.
The call to QDesktopServices launches firefox with an invalid url. The address bar indicates that "%3D" has been replaced with "%253D".
The documentation states:
Any occurrences of a percent character "%" not followed by exactly two hexadecimal characters (e.g., "13% coverage.html") will be replaced by "%25".
Which would suggest that %3D should work.
Any idea what's going on - a bugette perhaps?