Skip to content
Snippets Groups Projects

Resolve #3078075 "Detect and strip"

Open Dieter Holvoet requested to merge issue/linkit-3078075:3078075-detect-and-strip into 7.x
1 unresolved thread
@@ -570,8 +570,10 @@ class EntityMatcher extends ConfigurableMatcherBase {
// The link points to this domain. Make it relative so it can be
// matched in Url::fromUserInput().
$host = parse_url($user_input, PHP_URL_HOST);
$host_end = strpos($user_input, $host) + strlen($host);
$user_input = substr($user_input, $host_end);
$port = parse_url($user_input, PHP_URL_PORT);
$host_and_port = $host . ($port ? ':' . $port : '');
$host_and_port_end = strpos($user_input, $host_and_port) + strlen($host_and_port);
$user_input = substr($user_input, $host_and_port_end);
}
}
Loading