Programming Language PHP

Namespace Elabftw\Services

Class Filter

Method/Function body

Total Examples 4

4 code examples of PHP Elabftw\Services\Filter::body extracted from open source projects

Was this example useful?
0
                                                    public function testBody(): void
    {
        $this->assertEquals('my body', Filter::body('my body'));
        $this->assertEquals('my body', Filter::body('my body<script></script>'));
        $this->expectException(ImproperActionException::class);
        $body = str_repeat('a', 4120001);
        Filter::body($body);
    }
                                            
Was this example useful?
0
                                                    public function getBody(): string
    {
        return Filter::body($this->extra['body']);
    }
                                            
Was this example useful?
0
                                                    public function getExtraBody(): string
    {
        return Filter::body($this->extra['body'] ?? '');
    }
                                            
Was this example useful?
0
                                                    public function getBody(): string
    {
        return Filter::body($this->content);
    }