Skip to Content.
Sympa Menu

microid - Re: [Microid] Encode URLs?

microid AT lists.ibiblio.org

Subject: Microid mailing list

List archive

Chronological Thread  
  • From: "Paco NATHAN" <ceteri AT gmail.com>
  • To: "Peter Saint-Andre" <stpeter AT jabber.org>
  • Cc: microid AT lists.ibiblio.org
  • Subject: Re: [Microid] Encode URLs?
  • Date: Mon, 16 Apr 2007 16:36:41 -0700

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. :)




Archive powered by MHonArc 2.6.24.

Top of Page