aboutsummaryrefslogtreecommitdiff
path: root/ratatoeskr/sys/textprocessors/PlainTextProcessor.php
blob: c8f13f6749bd8be2167a33c95965c923f85be527 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php


namespace r7r\cms\sys\textprocessors;

use r7r\cms\sys\Esc;

/**
 * A textprocessor that simply escapes the input string.
 */
class PlainTextProcessor implements Textprocessor
{
    public function apply(string $input): string
    {
        return Esc::esc($input, Esc::HTML_WITH_BR);
    }

    public function showInBackend(): bool
    {
        return true;
    }
}