As described in the second case in https://bugs.kde.org/show_bug.cgi?id=393496, this Konqueror plugin will crash with an assert within KProtocolManager if it is given (passed on command line, typed in address bar, clicked link etc) an invalid URL or one with an unknown protocol. This change fixes that by ensuring that the URL is valid before it is used.
KELibs4Support and its includes/classes are still used by this plugin. Porting them will follow in a separate review.