mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 23:44:11 +01:00
N°3918 - Fix wiki syntax "[[CLASS:ID]]" not working in logs
This commit is contained in:
@@ -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
|
||||
//
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<div class="ibo-activity-entry--main-information-content" data-role="ibo-activity-entry--main-information-content">
|
||||
{% block iboActivityEntryMainInformationContent %}
|
||||
{# Content is printed as raw because it is stored as HTML in the database and should have been sanitized before storage, so we can assume it is safe #}
|
||||
{{ oUIBlock.GetContent()|raw }}
|
||||
{{ oUIBlock.GetContent()|render_wiki_to_html|raw }}
|
||||
{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user