[whatwg] [WF2] action="mailto:" - encoding spaces

Ian Hickson ian at hixie.ch
Wed Oct 29 00:42:17 PDT 2008


On Wed, 29 Oct 2008, Michael A. Puls II wrote:
> 
> Question though.
> 
> What about the method="POST" case where the query string is kept?
>
> For example:
> 
> <form action="mailto:?subject=1+2" method="POST">
>     <input type="text" name="body" value="1+2">
>     <input type="text" name="other" value="1 2">
>     <input type="submit">
> </form>
> 
> When submitting that, I expect to see:
> 
> mailto:?subject=1%2B2&body=body%3D1%252B2%26other%3D1%25202
> 
> submitted to the mail client.
> 
> The current POST section seems to say that this would be submitted instead:
> 
> mailto:?subject=1+2&body=body%3D1%252B2%26other%3D1+2
> 
> In other words, I think spaces in values should be emitted as %20 for 
> POST too and in the case there's a query string present in the action 
> attribute for POST, any + in the hvalues of the query string should be 
> normalized to %2B (to be consistent with a + inside a form control's 
> value that gets converted to %2B)

The idea is that the same thing as would be posted to an HTTP server is 
what is sent using the e-mail body, so I think we'd want the exact same 
"+" behavior as normally.


> Also, for POST only, if there isn't a subject hvalue specified in the 
> action attribute, Firefox will append 
> subject=Form%20Post%20from%20Firefox so that "Form Post from Firefox" 
> ends up in the mail client's subject field. Do you think "Form Post from 
> UA" should be specified?

I don't think that's really necessary; UAs are free to implement e-mails 
however they like really.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'



More information about the whatwg mailing list