FIX Use HTMLValue::class

This commit is contained in:
Steve Boyd 2023-01-18 10:34:46 +13:00
parent a8a2e6b0bd
commit 746ac8aedf
1 changed files with 2 additions and 1 deletions

View File

@ -11,6 +11,7 @@ use SilverStripe\Forms\CheckboxField;
use SilverStripe\Forms\CompositeField; use SilverStripe\Forms\CompositeField;
use SilverStripe\Forms\LiteralField; use SilverStripe\Forms\LiteralField;
use SilverStripe\UserForms\Model\EditableFormField; use SilverStripe\UserForms\Model\EditableFormField;
use SilverStripe\View\Parsers\HTMLValue;
/** /**
* Editable Literal Field. A literal field is just a blank slate where * Editable Literal Field. A literal field is just a blank slate where
@ -83,7 +84,7 @@ class EditableLiteralField extends EditableFormField
} }
// Perform sanitisation // Perform sanitisation
$htmlValue = Injector::inst()->create('HTMLValue', $content); $htmlValue = Injector::inst()->create(HTMLValue::class, $content);
$santiser = Injector::inst()->create(HTMLEditorSanitiser::class, $this->getEditorConfig()); $santiser = Injector::inst()->create(HTMLEditorSanitiser::class, $this->getEditorConfig());
$santiser->sanitise($htmlValue); $santiser->sanitise($htmlValue);
return $htmlValue->getContent(); return $htmlValue->getContent();