Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / Mac Programming / May 2008



Tip: Looking for answers? Try searching our database.

Webkit -> open URL -> M-ID -> percent escapes

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Florian Zschocke - 26 May 2008 08:53 GMT
Hello NG,

I use Webkit to render NNTP-Message content.
I translate the message-id into a link:
<bob-F1B8ED.06474220052008@[199.45.49.11]> gets
<news:bob-F1B8ED.06474220052008@[199.45.49.11]>

From the system ( performing the open url ) or webkit it is translated into
<bob-F1B8ED.06474220052008@%5B199.45.49.11%5D>.
Is that a bug or did I miss something?

Thanx - Florian
Reinder Verlinde - 26 May 2008 18:23 GMT
In article
<69EC6CCA-0099-4CDA-9A80-E07229E627BE%edv@zschocke-berlin.de>,

> Hello NG,
>
[quoted text clipped - 6 lines]
> <bob-F1B8ED.06474220052008@%5B199.45.49.11%5D>.
> Is that a bug or did I miss something?

I think you missed <http://www.faqs.org/rfcs/rfc1738.html>:

>    Unsafe:
>
[quoted text clipped - 18 lines]
>    reserved characters used for their reserved purposes may be used
>    unencoded within a URL.

Reinder
Florian Zschocke - 26 May 2008 20:06 GMT
Reinder Verlinde <reinder@verlinde.invalid> schrieb:


> I think you missed <http://www.faqs.org/rfcs/rfc1738.html>:
>
[quoted text clipped - 20 lines]
>>    reserved characters used for their reserved purposes may be used
>>    unencoded within a URL.

Yes, you are right.
It should be translated this way.
I was sleeping.
But I really would prefer to care about these things myself.
My only problem is that it dose not escape the "%".
M-IDs often contain "%".
The "%" stays unchanged and if you try to translate it back it will produce
something else. That was confusing me.
I would translate it myself but since this kind of URL has no describing part
you would see all the percent escape - thats ugly.

Florian
Florian Zschocke - 26 May 2008 21:00 GMT
Florian Zschocke <edv@zschocke-berlin.de> schrieb:

> I would translate it myself but since this kind of URL has no describing part
> you would see all the percent escape - thats ugly.

Not true - sorry.

Florian
Florian Zschocke - 26 May 2008 21:18 GMT
Florian Zschocke <edv@zschocke-berlin.de> schrieb:

Applying the percent escapes myself fixed the problem.

Florian
Florian Zschocke - 27 May 2008 14:23 GMT
Florian Zschocke <edv@zschocke-berlin.de> schrieb:

> My only problem is that it dose not escape the "%".

But that is a bug than?

> The character "%" is unsafe because it is used for 
> encodings of other characters.

To work propper it had to escape "%" too.

[NSString -stringByAddingPercentEscapesUsingEncoding:] dose it
correct.

Florian
Florian Zschocke - 28 May 2008 15:15 GMT
Florian Zschocke <edv@zschocke-berlin.de> schrieb:

> Florian Zschocke <edv@zschocke-berlin.de> schrieb:
>  
[quoted text clipped - 6 lines]
>
> To work propper it had to escape "%" too.

By the way I found that Mail.app tries to make a link out of a
<news:m-id> URL if you hit the send button, but you have to add
percent escapes yourself. If not the URL will get truncated at least
at the "%". I did not test any other "unsafe characters" jet.

Florian
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.