diff options
Diffstat (limited to 'phpBB/phpbb/textformatter/s9e/renderer.php')
-rw-r--r-- | phpBB/phpbb/textformatter/s9e/renderer.php | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/phpBB/phpbb/textformatter/s9e/renderer.php b/phpBB/phpbb/textformatter/s9e/renderer.php index 943056e6ca..3ec5f38029 100644 --- a/phpBB/phpbb/textformatter/s9e/renderer.php +++ b/phpBB/phpbb/textformatter/s9e/renderer.php @@ -20,6 +20,11 @@ namespace phpbb\textformatter\s9e; class renderer extends \phpbb\textformatter\renderer { /** + * @var s9e\TextFormatter\Plugins\Censor\Helper + */ + protected $censor; + + /** * @var s9e\TextFormatter\Renderer */ protected $renderer; @@ -56,7 +61,6 @@ class renderer extends \phpbb\textformatter\renderer public function __construct(\phpbb\cache\driver\driver_interface $cache, $cache_dir, $key, factory $factory) { $renderer_data = $cache->get($key); - if ($renderer_data) { $class = $renderer_data['class']; @@ -76,6 +80,11 @@ class renderer extends \phpbb\textformatter\renderer { $renderer = unserialize($renderer_data['renderer']); } + + if (isset($renderer_data['censor'])) + { + $censor = $renderer_data['censor']; + } } if (!isset($renderer)) @@ -83,6 +92,11 @@ class renderer extends \phpbb\textformatter\renderer extract($factory->regenerate()); } + if (isset($censor)) + { + $this->censor = $censor; + } + $this->renderer = $renderer; } @@ -146,6 +160,11 @@ class renderer extends \phpbb\textformatter\renderer { $html = $this->renderer->render($text); + if (isset($this->censor) && $this->viewcensors) + { + $html = $this->censor->censorHtml($html, true); + } + /** * @see bbcode::bbcode_second_pass_code() */ |