{"id":2128,"date":"2010-05-11T11:53:38","date_gmt":"2010-05-11T08:53:38","guid":{"rendered":"http:\/\/mummila.net\/nuudelisoppa\/?p=2128"},"modified":"2010-05-11T11:53:38","modified_gmt":"2010-05-11T08:53:38","slug":"url-with-trailing-punctuation-in-email-a-half-solution","status":"publish","type":"post","link":"https:\/\/mummila.net\/nuudelisoppa\/2010\/05\/11\/url-with-trailing-punctuation-in-email-a-half-solution\/","title":{"rendered":"URL with trailing punctuation in email: a half-solution"},"content":{"rendered":"<p>Pasting URLs into email messages has always made me somewhat uneasy, when the URL is right at the end of a sentence or right before a closing parenthesis: how do I know that the receiver&#8217;s email application knows to tell the puctuation apart from the URL? For example, let me enclose a URL (http:\/\/mummila.net\/nuudelisoppa) here. Will the receiver&#8217;s browser take them to <a href=\"http:\/\/mummila.net\/nuudelisoppa)\" title=\"http:\/\/mummila.net\/nuudelisoppa)\">http:\/\/mummila.net\/nuudelisoppa)<\/a> instead of <a href=\"http:\/\/mummila.net\/nuudelisoppa\" title=\"http:\/\/mummila.net\/nuudelisoppa\">http:\/\/mummila.net\/nuudelisoppa<\/a> without the closing bracket?<\/p>\n<p>Sometimes I work around this by using extra whitespace between the last character of the URL and the closing bracket or other punctuation immediately following it like so: http:\/\/mummila.net\/nuudelisoppa .<\/p>\n<p>But that looks just stupid. Also, the punctuation turns into an <a href=\"https:\/\/secure.wikimedia.org\/wikipedia\/en\/wiki\/Orphan_%28typesetting%29\" title=\"Wikipedia: Orphan (typesetting)\">orphan<\/a> all too easily.<\/p>\n<p>Well, I just realized that for some URLs there&#8217;s a trick I can use to work around the issue: instead of whitespace, use #. The hash in URLs is used as a <a href=\"https:\/\/secure.wikimedia.org\/wikipedia\/en\/wiki\/Fragment_identifier\" title=\"Wikipedia: Fragment identifier\">fragment identifier<\/a>, and if there&#8217;s no corresponding identifier in the document you&#8217;re referring to, the fallback is to just go to the document top \u2014 which is where you wanted to point to, anyway: <a href=\"http:\/\/mummila.net\/nuudelisoppa\/#.\" title=\"http:\/\/mummila.net\/nuudelisoppa\/#.\">http:\/\/mummila.net\/nuudelisoppa\/#.<\/a><\/p>\n<p>There are cases where this still doesn&#8217;t work, or works unlike intended.<\/p>\n<p>If your URL already has a fragment identifier (<a href=\"https:\/\/secure.wikimedia.org\/wikipedia\/en\/wiki\/Bracket#Parentheses_.28_.29\" title=\"https:\/\/secure.wikimedia.org\/wikipedia\/en\/wiki\/Bracket#Parentheses_.28_.29\">https:\/\/secure.wikimedia.org\/wikipedia\/en\/wiki\/Bracket#Parentheses_.28_.29<\/a>), it&#8217;ll fail to point to your intended target when you add another #identifier to it (<a href=\"https:\/\/secure.wikimedia.org\/wikipedia\/en\/wiki\/Bracket#Parentheses_.28_.29#\" title=\"https:\/\/secure.wikimedia.org\/wikipedia\/en\/wiki\/Bracket#Parentheses_.28_.29#\">https:\/\/secure.wikimedia.org\/wikipedia\/en\/wiki\/Bracket#Parentheses_.28_.29#<\/a>).<\/p>\n<p>Also, at least in theory it&#8217;s possible that there&#8217;s an identifier made up of a single punctuation character \u2014 say, an <code>id=\".\"<\/code> \u2014 in the document you&#8217;re referring to, and you don&#8217;t intend to point to that identifier but to document top. Using # just before said punctuation then makes your link point to the fragment rather than document top.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Pasting URLs into email messages has always made me somewhat uneasy, when the URL is right at the end of a sentence or right before a closing parenthesis: how do I know that the receiver&#8217;s email application knows to tell the puctuation apart from the URL? For example, let me enclose a URL (http:\/\/mummila.net\/nuudelisoppa) here. [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2128","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/posts\/2128","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/comments?post=2128"}],"version-history":[{"count":14,"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/posts\/2128\/revisions"}],"predecessor-version":[{"id":2142,"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/posts\/2128\/revisions\/2142"}],"wp:attachment":[{"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/media?parent=2128"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/categories?post=2128"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/tags?post=2128"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}