N°3918 - Fix wiki syntax "[[CLASS:ID]]" not working in logs

This commit is contained in:
Molkobain
2021-08-12 17:28:50 +02:00
parent 095c975ec6
commit 7af10e5197
2 changed files with 13 additions and 1 deletions

View File

@@ -8,6 +8,7 @@ namespace Combodo\iTop\Application\TwigBase\Twig;
use AttributeDateTime;
use AttributeText;
use Combodo\iTop\Application\UI\Base\iUIBlock;
use Combodo\iTop\Renderer\BlockRenderer;
use Dict;
@@ -98,6 +99,17 @@ class Extension
})
);
/**
* Filter to transform the wiki syntax into HTML
*
* @uses \AttributeText::RenderWikiHtml()
* @since 3.0.0
*/
$oTwigEnv->addFilter(new Twig_SimpleFilter('render_wiki_to_html', function ($sString) {
return AttributeText::RenderWikiHtml($sString);
})
);
// Filter to add a parameter at the end of the URL to force cache invalidation after an upgrade.
// Previously we put the iTop version but now it's the last setup/toolkit timestamp to avoid cache issues when building several times the same version during tests
//