SUMMARY I have cb_thunderlink registered to handle the cbthunderlink:// URI scheme as described in: https://camiel.bouchier.be/en/cb_thunderlink/installation/linux. However the links don't successfully open in Thunderbird as expected. I copied the link to konsole and did some experimenting and found that: $ kde-open cbthunderlink://MjAyMy0wNy0wMVQwMzozMzo1NS4wMDBaOyJXaXNlIiA8bm9yZXBseUB3aXNlLmN worked as expected but $ kde-open cbthunderlink://MjAyMy0wNy0wMVQwMzozMzo1NS4wMDBaOyJXaXNlIiA8bm9yZXBseUB3aXNlLmNv did not. I noticed that the entire URI is 80 characters and the portion after the "://" is 64 characters, which is suspicious. STEPS TO REPRODUCE 1. Install cb_thunderlink as https://camiel.bouchier.be/en/cb_thunderlink/installation/linux 2. Register the uri scheme handler with "xdg-mime default cb_thunderlink_cbthunderlink.desktop x-scheme-handler/cbthunderlink" 3. Copy a cbthunderlink link from Thunderbird, or use this one: cbthunderlink://MjAyMi0xMi0wN1QwNjoxMTowNy4wMDBaOyJBbGlFeHByZXNzIiA8dHJhbnNhY3Rpb25Abm90aWNlLmFsaWV4cHJlc3MuY29tPg== 4. Run "kde-open <uri>" OBSERVED RESULT Link opens in default browser EXPECTED RESULT Link opens in Thunderbird SOFTWARE/OS VERSIONS Operating System: Debian GNU/Linux 12 KDE Plasma Version: 5.27.5 KDE Frameworks Version: 5.103.0 Qt Version: 5.15.8 Kernel Version: 6.1.0-9-amd64 (64-bit) ADDITIONAL INFORMATION I am downloading KDE Neon testing to confirm that I can reproduce there, but I won't get to that immediately.
I just tried on KDE Neon and got the same result: Operating System: KDE neon Testing Edition KDE Plasma Version: 5.27.6 KDE Frameworks Version: 5.108.0 Qt Version: 5.15.10 Kernel Version: 5.19.0-45-generic (64-bit) Graphics Platform: X11
Can reproduce. For me the cutoff is between `slack://123k1j2lk3j1lk23jasdfsadkfklsadjflksjakfjsdafsakjfksjfklsdjalfg1` and `slack://123k1j2lk3j1lk23jasdfsadkfklsadjflksjakfjsdafsakjfksjfklsdjalfg`.
After some research, I am closing this as INTENTIONAL. Short answer: Don't add the double slashes for custom schemes. Just use custom-scheme:xxxxx, instead of custom-scheme://xxxxxx. Long answer: With the double slashes, the part that comes after will be interpreted as a host. As per specifications, the host cannot have more than 63 characters. So QUrl::fromUserInput perceives this to be an invalid url, and tries to fix this. The 'fixed' url becomes http://custom-scheme//xxxxxxx. On the other hand, if the double slashes are not included, then what comes after becomes interpreted as the path, which does not have the 63 character limit. So QUrl::fromUserInput treats it as valid url and doesn't modify it. References: https://en.wikipedia.org/wiki/Uniform_Resource_Identifier https://en.wikipedia.org/wiki/Hostname#Restrictions_on_valid_host_names https://bugreports.qt.io/browse/QTBUG-18280