Skip to content
Snippets Groups Projects

Resolve #3512462 "Broken links "

Merged Luis Ruiz Peidró requested to merge issue/entity_mesh-3512462:3512462-broken-links-- into 1.x
Files
3
+ 11
2
@@ -472,8 +472,17 @@ class Repository implements RepositoryInterface {
if (empty($prefix)) {
return $path;
}
$path = ltrim($path, '/');
return str_replace($prefix, '', $path);
// We ensure 2 structures: /langcode/path or /langcode.
$processed_path = ltrim($path, '/');
if (str_starts_with($processed_path, $prefix . '/')) {
$path = substr($processed_path, strlen($prefix));
}
elseif ($processed_path === $prefix) {
$path = '/';
}
return $path;
}
/**
Loading