[Microid] Encode URLs?

Paco NATHAN ceteri at gmail.com
Mon Apr 16 19:36:41 EDT 2007


That  brings up a good point.  Is there a list of known "edge cases"
which we could use for creating unit tests?  Examples like this one
could be used to begin to build a list.

I could add that kind of unit testing to the Java library.

Thanks,
Paco


On 4/16/07, Peter Saint-Andre <stpeter at jabber.org> wrote:
>> AFAICS, URIs within MicroID need to conform to RFC 3986. Therefore
>> percent-encoding (%hexhex) would be required for certain characters. For
>> your web page address ...
>>
>>http://www.mediauk.com/discussions/profile.muk?mode=viewprofile&u=1
>
> The JavaScript code on microid.org does not perform any encoding:
>
> function compute()
> {
>      var f = document.forms['gen'];
>      var com_sha = hex_sha1(f.com.value);
>      var auth_sha = hex_sha1(f.auth.value);
>      f.microid.value = "mailto+http:sha1:" + hex_sha1(com_sha+auth_sha);
> }
>
> So I think the error is there.
>
> Feel free to contribute corrected code. :)


More information about the Microid mailing list