Skip to main content
Commonmark migration
Source Link

The problem

##The problem BeingBeing a user with an accented vowel in my name I'm used to it being mangled and broken, losing the accent and so on, but today I reported what I though was a bug for Slack to their support, telling them that when they unfurl the link to my profile, or any other link with accented characters in the title/url, they're showing the encoded version of the value instead of the decoded and user friendly one.

##Is he right?

Is he right?

Note

##Note ThisThis is not a matter of how the browser handles encoding and decoding of urls, it's a matter of encoding a string twice hence rendering the decoding code of sites unfurling the url useless.

##Unfurl? (↓Rant warning↓)

Unfurl? (↓Rant warning↓)

##The problem Being a user with an accented vowel in my name I'm used to it being mangled and broken, losing the accent and so on, but today I reported what I though was a bug for Slack to their support, telling them that when they unfurl the link to my profile, or any other link with accented characters in the title/url, they're showing the encoded version of the value instead of the decoded and user friendly one.

##Is he right?

##Note This is not a matter of how the browser handles encoding and decoding of urls, it's a matter of encoding a string twice hence rendering the decoding code of sites unfurling the url useless.

##Unfurl? (↓Rant warning↓)

The problem

Being a user with an accented vowel in my name I'm used to it being mangled and broken, losing the accent and so on, but today I reported what I though was a bug for Slack to their support, telling them that when they unfurl the link to my profile, or any other link with accented characters in the title/url, they're showing the encoded version of the value instead of the decoded and user friendly one.

Is he right?

Note

This is not a matter of how the browser handles encoding and decoding of urls, it's a matter of encoding a string twice hence rendering the decoding code of sites unfurling the url useless.

Unfurl? (↓Rant warning↓)

replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

In this case, the bug is on Stack Overflow's end. If you view the source on your profile page at http://stackoverflow.com/users/363262/juan-cortéshttps://stackoverflow.com/users/363262/juan-cortés, you can see that Stack Overflow has double-encoded the é in your name:

<meta name="twitter:title" property="og:title" itemprop="title name" content="User Juan Cort&amp;#233;s" />

(The accent in your name should be represented as &#233;, but is getting HTML escaped for a second time, leading to &amp;#233;.)

<html>
    <head>
        <meta property="og:url" content="httpcontent="https://stackoverflow.com/users/363262/juan-cort%C3%A9s"/>
        <meta property="og:title" content="User profile for  Juan Cortés"/>
        <meta property="og:description" content="With a reputation of 10k this user has provided the community with 286 anwers and lorem ipsum dolor sit amet, consectetur adipisicing elit. Doloremque earum distinctio deleniti facere beatae tenetur exercitationem asperiores velit, voluptates aut, harum saepe obcaecati, dolor. Modi beatae eligendi veniam id nisi. Join our great community today!."/>
        <meta property="og:site_name" content="Stackoverflow"/>
        <meta property="og:image" itemprop="image primaryImageOfPage" content="https://i.sstatic.net/KfKSr.png?s=120&g=1"/>
    </head>
</html>

In this case, the bug is on Stack Overflow's end. If you view the source on your profile page at http://stackoverflow.com/users/363262/juan-cortés, you can see that Stack Overflow has double-encoded the é in your name:

<meta name="twitter:title" property="og:title" itemprop="title name" content="User Juan Cort&amp;#233;s" />

(The accent in your name should be represented as &#233;, but is getting HTML escaped for a second time, leading to &amp;#233;.)

<html>
    <head>
        <meta property="og:url" content="http://stackoverflow.com/users/363262/juan-cort%C3%A9s"/>
        <meta property="og:title" content="User profile for  Juan Cortés"/>
        <meta property="og:description" content="With a reputation of 10k this user has provided the community with 286 anwers and lorem ipsum dolor sit amet, consectetur adipisicing elit. Doloremque earum distinctio deleniti facere beatae tenetur exercitationem asperiores velit, voluptates aut, harum saepe obcaecati, dolor. Modi beatae eligendi veniam id nisi. Join our great community today!."/>
        <meta property="og:site_name" content="Stackoverflow"/>
        <meta property="og:image" itemprop="image primaryImageOfPage" content="https://i.sstatic.net/KfKSr.png?s=120&g=1"/>
    </head>
</html>

In this case, the bug is on Stack Overflow's end. If you view the source on your profile page at https://stackoverflow.com/users/363262/juan-cortés, you can see that Stack Overflow has double-encoded the é in your name:

<meta name="twitter:title" property="og:title" itemprop="title name" content="User Juan Cort&amp;#233;s" />

(The accent in your name should be represented as &#233;, but is getting HTML escaped for a second time, leading to &amp;#233;.)

<html>
    <head>
        <meta property="og:url" content="https://stackoverflow.com/users/363262/juan-cort%C3%A9s"/>
        <meta property="og:title" content="User profile for  Juan Cortés"/>
        <meta property="og:description" content="With a reputation of 10k this user has provided the community with 286 anwers and lorem ipsum dolor sit amet, consectetur adipisicing elit. Doloremque earum distinctio deleniti facere beatae tenetur exercitationem asperiores velit, voluptates aut, harum saepe obcaecati, dolor. Modi beatae eligendi veniam id nisi. Join our great community today!."/>
        <meta property="og:site_name" content="Stackoverflow"/>
        <meta property="og:image" itemprop="image primaryImageOfPage" content="https://i.sstatic.net/KfKSr.png?s=120&g=1"/>
    </head>
</html>
removed unfurl-tag which is specifically used by Slack to name one of their functionalities (https://api.slack.com/docs/message-attachments#unfurling), thus not adding value as a tag on SO Meta
Link
Matt
  • 13.8k
  • 2
  • 13
  • 18
Rollback to Revision 7
Source Link
user4151918
user4151918
Loading
added 396 characters in body
Source Link
Juan Cortés
  • 21k
  • 15
  • 11
Loading
edited tags
Link
Marc Gravell Mod
  • 1.1m
  • 1
  • 62
  • 59
Loading
edited title
Link
Juan Cortés
  • 21k
  • 15
  • 11
Loading
added 4 characters in body
Source Link
CodeCaster
  • 151.3k
  • 33
  • 187
  • 311
Loading
added 2436 characters in body; edited tags; edited title
Source Link
Juan Cortés
  • 21k
  • 15
  • 11
Loading
added 182 characters in body
Source Link
Juan Cortés
  • 21k
  • 15
  • 11
Loading
added 59 characters in body
Source Link
Juan Cortés
  • 21k
  • 15
  • 11
Loading
Source Link
Juan Cortés
  • 21k
  • 15
  • 11
Loading