- From: James M Snell <jasnell@gmail.com>
- Date: Wed, 27 Dec 2006 11:49:07 -0800
- To: Joe Gregorio <joe@bitworking.org>
- CC: Mark Nottingham <mnot@mnot.net>, uri@w3.org
Ugh. I'd rather we not go down the path of embedding encoding
information into the template. Let's just pick a reasonable default and
leave it at that.
Extensions that affect the selection and validation of the replacement
value are fine.
- James
Joe Gregorio wrote:
> [snip]
> Allow a ':' at the end of a variable name to separate out options, and then
> add an option 'enc=<enc>' where
> 'enc' could be:
>
> enc="strict"
> All characters outside (iprivate | iunreserved) are % encoded
>
> enc="sub"
> Characters outside (iprivate | iunreserved | sub-delims) are % encoded
>
> enc="none"
> No characters are % encoded
>
> enc="default"
> Or if '=<enc>' isn't provided then the default encoding is used:
>
> Characters outside ( iprivate | iunreserved | '@' | ':' | '/' ) are
> % encoded.
>
> So back to the example, if we have:
>
> http://bitworking.org/{path:enc=strict}
>
> and
>
> path = "projects/httplib2/"
>
> then that gets interpreted as:
>
> http://bitworking.org/projects%2Fhttplib2%2F
>
> and
>
> http://bitworking.org/{path:enc=default}
>
> gets interpreted as:
>
> http://bitworking.org/projects/httplib2/
>
> Note that
>
> http://bitworking.org/{path:enc=default}
>
> and
>
> http://bitworking.org/{path}
>
> will give equivalent values.
>
> Again, with this I worry about complexity and surprising behavior:
>
> http://example.org?a={b:enc=strict}
> b = "a=test"
>
> gives:
>
> http://example.org?a=a%3Dtest
>
> while
>
> http://example.org{b:enc=none}
> b = "?a=test"
>
> gives:
>
> http://example.org?a=test
>
> -joe
>
Received on Wednesday, 27 December 2006 19:49:19 UTC