mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 02:28:44 +02: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 AttributeDateTime;
|
||||||
|
use AttributeText;
|
||||||
use Combodo\iTop\Application\UI\Base\iUIBlock;
|
use Combodo\iTop\Application\UI\Base\iUIBlock;
|
||||||
use Combodo\iTop\Renderer\BlockRenderer;
|
use Combodo\iTop\Renderer\BlockRenderer;
|
||||||
use Dict;
|
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.
|
// 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
|
// 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">
|
<div class="ibo-activity-entry--main-information-content" data-role="ibo-activity-entry--main-information-content">
|
||||||
{% block iboActivityEntryMainInformationContent %}
|
{% 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 #}
|
{# 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 %}
|
{% endblock %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user