1 | <?php |
||
21 | class MyAwesomeBaseModule extends BaseModule implements BaseModuleInterface{ |
||
22 | |||
23 | /** |
||
24 | * Holds an array of FQN strings to the current base module's children |
||
25 | * |
||
26 | * @var array |
||
27 | * @see \chillerlan\bbcode\Modules\ModuleInfo::$modules |
||
28 | */ |
||
29 | protected $modules = [ |
||
30 | '\\Example\\MyModules\\MyAwesomeModule', |
||
31 | ]; |
||
32 | |||
33 | /** |
||
34 | * Holds the current base module's EOL token which will replace any newlines |
||
35 | * |
||
36 | * @var string |
||
37 | * @see \chillerlan\bbcode\Modules\ModuleInfo::$eol_token |
||
38 | */ |
||
39 | protected $eol_token = '<br />'; |
||
40 | |||
41 | /** |
||
42 | * Sanitizes the content to prevent vulnerabilities or compatibility problems |
||
43 | * |
||
44 | * @param $content string to sanitize |
||
45 | * |
||
46 | * @return string |
||
47 | */ |
||
48 | public function sanitize($content){ |
||
49 | return htmlspecialchars($content, ENT_NOQUOTES|ENT_HTML5, 'UTF-8', false); |
||
50 | } |
||
51 | |||
52 | } |
||
53 |