Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jemond’s picture

Patch attached.

jemond’s picture

Status: Active » Needs review
jemond’s picture

Paths fixed.

jcfiala’s picture

Status: Needs review » Needs work

Hm. Although it does remove the http/https scheme, there's more than just those two schemes that are allowed via the link module - I'd want the formatter to handle any scheme that comes up, either with a regex based on the allowed list, or using parse_url to strip them out.

omarlopesino’s picture

I add a patch using parse_url. I thinked about do finding the position of the '://' string, but i thinked that it would be possible that the url contains string in other parts.

omarlopesino’s picture

Status: Needs work » Needs review

The last submitted patch, 1: link-no_protocol_formatter-2216399-1.patch, failed testing.

mibfire’s picture

@mistermoper

There is a error in link-no_protocol_formatter-2216399-4.patch patch.

This line:

return $vars['element']['url'] ? l($display_url, $display_url, $link_options) : '';

has to be the following:

return $vars['element']['url'] ? l($display_url, $vars['element']['url'], $link_options) : '';
mibfire’s picture

And the first occurrence has to be replaced. I fixed both in a patch.

albertski’s picture

Status: Needs review » Reviewed & tested by the community

I needed this functionality as well.

  • Reviewed patch and it looks good
  • Ran patch without any issues
nileema.jadhav’s picture

Status: Reviewed & tested by the community » Needs review
FileSize
1.63 KB

Re-rolled the patch #9

ruchirashree’s picture

Reviewed and tested with D7.x, PHP 5.6, Mysql 5.5. Working as expected.

albertski’s picture

@ruchirashree Can you please change the status to Reviewed & tested by the community so the maintainer knows it is ready.

ruchirashree’s picture

Status: Needs review » Reviewed & tested by the community

Changing the status to RTBC.

  • nileema.jadhav committed 7c501ee on 7.x-1.x
    Issue #2216399 by jemond: Provide Formatter to remove http:// or https...
nileema.jadhav’s picture

nileema.jadhav’s picture

Status: Reviewed & tested by the community » Fixed

Added into 7.x-1.x-dev version.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.