What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 133 Stack Exchange communities.

On the job description page (see http://careers.stackoverflow.com/jobs/15712/c-sharp-developer-ontrack-performance-tools?a=iyWjFo4), if the job title contains a # symbol, the link is not handled properly. The html is:

<a href="mailto:hiring@heathandco.com?subject=C# Developer (via Stack Overflow Careers)&amp;body=%0d%0a--%0d%0aFound via Stack Overflow Careers 2.0%0d%0a">hiring@heathandco.com</a>

So that the subject is not fully copied to the address bar (at least in gmail).

share|improve this question
    
How have you set up Gmail as your default client? I am unable to reproduce this using a regular desktop client. –  Matt Sherman Jan 9 '12 at 15:45
    
Google provides an app called Gmail notifier, it automatically handles all mailto links. –  ulu Jan 10 '12 at 8:15
    
Sounds like that app is broken then. This works fine for me with Thunderbird. That said, I wonder whether you should be using an HTTP encoded entity there instead of the hash. –  Lightness Races in Orbit Jan 10 '12 at 19:09

1 Answer 1

up vote 3 down vote accepted

RFC 1738, section 2.2 ("URL Character Encoding Issues"):

In most URL schemes, the sequences of characters in different parts of a URL are used to represent sequences of octets used in Internet protocols. For example, in the ftp scheme, the host name, directory name and file names are such sequences of octets, represented by parts of the URL. Within those parts, an octet may be represented by the chararacter which has that octet as its code within the US-ASCII[20] coded character set.

In addition, octets may be encoded by a character triplet consisting of the character "%" followed by the two hexadecimal digits (from "0123456789ABCDEF") which forming the hexadecimal value of the octet. (The characters "abcdef" may also be used in hexadecimal encodings.)

Octets must be encoded if they have no corresponding graphic character within the US-ASCII coded character set, if the use of the corresponding character is unsafe, or if the corresponding character is reserved for some other interpretation within the particular URL scheme.

[..]

All unsafe characters must always be encoded within a URL. For example, the character "#" must be encoded within URLs even in systems that do not normally deal with fragment or anchor identifiers, so that if the URL is copied into another system that does use them, it will not be necessary to change the URL encoding.

So, although Mozilla Thunderbird handles this fine, your GMail Notifier is not incorrect to handle your URI in the manner that it does, and SO should rewrite that URI so that it is compliant:

mailto:hiring@heathandco.com?subject=C%23 Developer (via Stack Overflow Careers)&amp;body=%0d%0a--%0d%0aFound via Stack Overflow Careers 2.0%0d%0a
                                      ^^^

It's worth noting that the newer RFC6068 (that deals specifically with MAILTO URIs and was published in October 2010) does not mention # explicitly, though.


Bonus points if you can find the spelling mistake in that verbatim RFC text.

share|improve this answer
1  
Chararacter! My favorite. –  jadarnel27 Jan 10 '12 at 19:17
    
"you should rewrite your URI so that it is compliant" -- by "you" you mean the programmer(s) of the Stack Careers site? Cause that's where I found the error. –  ulu Jan 11 '12 at 10:30
    
@ulu: I hadn't grokked that the URI is auto-generated by the site. Then, yes. –  Lightness Races in Orbit Jan 11 '12 at 10:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .