protected function sanitiseContent($content)
    {
        // Check if sanitisation is enabled
        if (!HTMLEditorField::config()->get('sanitise_server_side')) {
            return $content;
        }

        // Perform sanitisation
        $htmlValue = Injector::inst()->create('HTMLValue', $content);
        $santiser = Injector::inst()->create(HTMLEditorSanitiser::class, $this->getEditorConfig());
        $santiser->sanitise($htmlValue);
        return $htmlValue->getContent();
    }
protected function sanitiseContent($content)
    {
        // Check if sanitisation is enabled
        if (!HTMLEditorField::config()->get('sanitise_server_side')) {
            return $content;
        }

        // Perform sanitisation
        $htmlValue = Injector::inst()->create('HTMLValue', $content);
        $santiser = Injector::inst()->create(HTMLEditorSanitiser::class, $this->getEditorConfig());
        $santiser->sanitise($htmlValue);
        return $htmlValue->getContent();
    }
protected function sanitiseContent ( $ content ) { // Check if sanitisation is enabled if ( ! HTMLEditorField :: config ( ) -> get ( 'sanitise_server_side' ) ) { return $ content ; } // Perform sanitisation $ htmlValue = Injector :: inst ( ) -> create ( 'HTMLValue' , $ content ) ; $ santiser = Injector :: inst ( ) -> create ( HTMLEditorSanitiser :: class , $ this -> getEditorConfig ( ) ) ; $ santiser -> sanitise ( $ htmlValue ) ; return $ htmlValue -> getContent ( ) ; }
Safely sanitise html content, if enabled

@param string $content Raw html
@return string Safely sanitised html
Safely sanitise html content if enabled