encoded urls in KUrlNavigator

Thiago Macieira thiago at kde.org
Fri Jul 18 17:27:46 BST 2008


Sebastian Trüg wrote:
>For the nepomuk kio slave I wanted to use URIs as fields and values in
>queries. However, since URIs contain slashes I need to encode them. The
>result looks like this:
>
>nepomuksearch:/<http%253A%252F%252Fwww.semanticdesktop.org%252Fontologie
>s%252F2007%252F08%252F15%252Fnao%2523hasTag>:<tags%253A%252FNepomuk>
>
>(the query lang uses < > to mark URIs)
>
>Now the problem is that this results in an endless loop as
>KUrlNavigator::setUrl duplicates each %25 to %2525. I cannot determine
> why. But it seems to happen in the KUrl constructor.
>
>However, Konqueror has no problem here, probably because it does not use
>KUrlNavigator.
>
>I do not have enough inside here, so could someone please have a look.
> Dolphin not being able to handle encoded URLs entered by the user is
> not that a big deal, but an endless loop is.

Why don't you use the query instead of the path?

Why do you need to encode the slashes? QUrl will convert them back to real 
slashes.

-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080718/568132b2/attachment.sig>


More information about the kde-core-devel mailing list