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:
parent
bf1c0d7d4e
commit
8986570e1d
1 changed files with 0 additions and 15 deletions
|
|
@ -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.
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue