refactor(ToolboxHelper): remove unused method and import

Cleaned up ToolboxHelper by removing the unused stripCkEditorSchemesOnMediaInputs method
and its associated import, streamlining the code.
This commit is contained in:
Jérémy Munsch 2026-11-14 23:48:05 +01:00
parent bf1c0d7d4e
commit 8986570e1d
No known key found for this signature in database
GPG key ID: 2AAECDA6B7330F91

View file

@ -6,7 +6,6 @@ namespace App\Lib\Helpers;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\Validator;
use Illuminate\Support\Str;
use Illuminate\Validation\Rule;
class ToolboxHelper extends ToolboxHelperCore
@ -30,20 +29,6 @@ class ToolboxHelper extends ToolboxHelperCore
return $merged;
}
/**
* Strip scheme (https) on oembed urls
* Only embed allowed are for MP4 self hosted videos right now
*
* https is force by ckeditor MediaElements which natively supports
* only cloud hosted medias (youtube, spotify etc..)
*/
public static function stripCkEditorSchemesOnMediaInputs(string $input): string
{
return Str::of($input)
->replaceMatches('/(?<=<oembed url=")(http:\/\/)(?=.*?">)/m', '')
->toString();
}
/**
* Asserts that the field is unique.
*