aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/textformatter
diff options
context:
space:
mode:
authorJoshyPHP <s9e.dev@gmail.com>2015-03-21 12:32:17 +0100
committerJoshyPHP <s9e.dev@gmail.com>2015-04-02 19:16:03 +0200
commit69dae16ba79a82714b3fa24955c5cbc6e372a388 (patch)
treeb5c9b679f9ef152bc8796b3c07c38b3a9eec9a3f /phpBB/phpbb/textformatter
parent3cd5ca8de12f645f3c8664942f0328e18d5a2789 (diff)
downloadforums-69dae16ba79a82714b3fa24955c5cbc6e372a388.tar
forums-69dae16ba79a82714b3fa24955c5cbc6e372a388.tar.gz
forums-69dae16ba79a82714b3fa24955c5cbc6e372a388.tar.bz2
forums-69dae16ba79a82714b3fa24955c5cbc6e372a388.tar.xz
forums-69dae16ba79a82714b3fa24955c5cbc6e372a388.zip
[ticket/11768] Preserve comments in custom BBCodes
PHPBB3-11768
Diffstat (limited to 'phpBB/phpbb/textformatter')
-rw-r--r--phpBB/phpbb/textformatter/s9e/factory.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/phpBB/phpbb/textformatter/s9e/factory.php b/phpBB/phpbb/textformatter/s9e/factory.php
index 4504a329af..bad9190973 100644
--- a/phpBB/phpbb/textformatter/s9e/factory.php
+++ b/phpBB/phpbb/textformatter/s9e/factory.php
@@ -180,6 +180,10 @@ class factory implements \phpbb\textformatter\cache_interface
// Don't automatically ignore text in places where text is not allowed
$configurator->rulesGenerator->remove('IgnoreTextIfDisallowed');
+ // Don't remove comments and instead convert them to xsl:comment elements
+ $configurator->templateNormalizer->remove('RemoveComments');
+ $configurator->templateNormalizer->add('TransposeComments');
+
// Set the rendering engine and configure it to save to the cache dir
$configurator->rendering->engine = 'PHP';
$configurator->rendering->engine->cacheDir = $this->cache_dir;