Skip to content

Provider/ISP URL sometimes does not work  #13045

@Findus23

Description

@Findus23

Another beginner friendly bug:

When I click on the ISP Rostelecom it wan't to go to http://www.rostelecom/ as it thinks the providername is an URL ending with com. As many ISPs are called telecom I guess this could happen quite often:

$extToExclude = array(
'com', 'net', 'org', 'co'
);

$e = explode('.', $hostname);
$s = sizeof($e);
// if extension not correct
if (isset($e[$s - 2]) && in_array($e[$s - 2], $extToExclude)) {
return $e[$s - 3] . "." . $e[$s - 2] . "." . $e[$s - 1];
} else {
return $e[$s - 2] . "." . $e[$s - 1];
}

PS: This code was added in def7586 11 years ago!

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugFor errors / faults / flaws / inconsistencies etc.Help wantedBeginner friendly issues or issues where we'd highly appreciate community's help and involvement.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions