encoding newlines in attribute values

perri at perrinelson.com perri at perrinelson.com
Thu Apr 19 06:28:51 UTC 2007


Just because one or two characters (entities) might be expanded in size by 300% doesn't justify expanding an entire attribute by 30%, especially if it's a got enough length to it to justify having newlines in it.

----- Original Message -----
From: "Douglas Otis" <dotis at mail-abuse.org>
To: "Marius Scurtescu" <marius at sxip.com>
Cc: "Mark Wahl" <Mark.Wahl at informed-control.com>, "OpenID specs list" <specs at openid.net>
Sent: Wednesday, April 18, 2007 11:25:17 PM (GMT-0800) America/Los_Angeles
Subject: Re: encoding newlines in attribute values


On Apr 18, 2007, at 8:31 PM, Marius Scurtescu wrote:

> Base64 encoding is a pretty good candidate for binary data, but you
> cannot apply the same encoding to text fields.

RFC4648 "URL and Filename safe" Base 64 Alphabet might be a good choice.

> Applying base64, or similar encoding appropriate for binary data, to
> text fields has two drawbacks:
> - renders the field unreadable

Binary data is often unreadable.

> - increases the size of the field

Base 64 increases the size of the encoded element by about 30%.

> URL-encoding has the advantage that probably all web frameworks will
> have functions to encode and decode this format.

URL-encoding increases the size of the encoded element by 300%.

-Doug


_______________________________________________
specs mailing list
specs at openid.net
http://openid.net/mailman/listinfo/specs




More information about the specs mailing list