The social links URLs in user profiles have code that displays https://twitter.com/mvc447 as Twitter, and so on. There's one for GitHub, but there isn't one for GitLab. Since they're our new best friends, perhaps they could be added to the list?

Example: https://www.drupal.org/u/mvc

Comments

mvc created an issue. See original summary.

avpaderno’s picture

Component: Site organization » Other
avpaderno’s picture

Project: Drupal.org site moderators » URL field
Version: » 7.x-1.x-dev
Component: Other » Code

The social links are implemented by the URL field module, which sets the link title in url_fetch_title().

function url_fetch_title($url) {
  $request = drupal_http_request($url);
  if (empty($request->error) && $request->code == 200 && !empty($request->data)) {
    if (preg_match('!<title>(.*?)</title>!iu', $request->data, $matches)) {
      // Title tags should be encoded, but we want the raw value.
      return decode_entities($matches[1]);
    }
  }
}

Gitlab sets a title, but for some reasons, it seems ignored.

avpaderno’s picture

I added the link to my Gitlab profile on my Drupal.org account, and it doesn't work, even if the link uses the https:// URL.

avpaderno’s picture

Title: Add special case for GitLab social link URLs in user profiles » Add special case for GitLab URLs