Skip to content

Commit

Permalink
Merge pull request #1184 from creative-commoners/pulls/5/htmlvalue
Browse files Browse the repository at this point in the history
FIX Use HTMLValue::class
  • Loading branch information
Maxime Rainville authored Jan 17, 2023
2 parents a8a2e6b + 746ac8a commit db55d68
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion code/Model/EditableFormField/EditableLiteralField.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
use SilverStripe\Forms\CompositeField;
use SilverStripe\Forms\LiteralField;
use SilverStripe\UserForms\Model\EditableFormField;
use SilverStripe\View\Parsers\HTMLValue;

/**
* Editable Literal Field. A literal field is just a blank slate where
Expand Down Expand Up @@ -83,7 +84,7 @@ protected function sanitiseContent($content)
}

// Perform sanitisation
$htmlValue = Injector::inst()->create('HTMLValue', $content);
$htmlValue = Injector::inst()->create(HTMLValue::class, $content);
$santiser = Injector::inst()->create(HTMLEditorSanitiser::class, $this->getEditorConfig());
$santiser->sanitise($htmlValue);
return $htmlValue->getContent();
Expand Down

0 comments on commit db55d68

Please sign in to comment.