Add https:// if not existing

This commit is contained in:
Jan Böhmer 2026-02-01 16:55:52 +01:00
parent 73dbe64a83
commit 52be548170

View file

@ -161,6 +161,14 @@ class GenericWebProvider implements InfoProviderInterface
public function getDetails(string $id): PartDetailDTO
{
//Add scheme if missing
if (!preg_match('/^https?:\/\//', $id)) {
//Remove any leading slashes
$id = ltrim($id, '/');
$id = 'https://'.$id;
}
$url = $id;
//Try to get the webpage content