[TikiWiki-commits] [Git][tikiwiki/tiki][master] [FIX] Smarty: make safe_html use Tiki HTMLPurifier cache config to avoid...
"luci \(@luciash\) via TikiWiki-cvs" <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <6a14a47d9d963_38192c88668a8@gitlab-sidekiq-low-urgency-cpu-bound-v2-5bd7895658-q2rjr.mail> |
luci pushed to branch master at Tiki Wiki CMS Groupware / Tiki
Commits:
1b4debf4 by MAGENE Sem Joel at 2026-05-25T19:17:59+00:00
[FIX] Smarty: make safe_html use Tiki HTMLPurifier cache config to avoid unwritable vendor DefinitionCache warnings
---
* [FIX] Smarty: make safe_html use Tiki HTMLPurifier cache config to avoid unwritable vendor DefinitionCache warnings
See merge request tikiwiki/tiki!10260
- - - - -
1 changed file:
- lib/smarty_tiki/Extension/SmartyTikiExtension.php
Changes:
=====================================
lib/smarty_tiki/Extension/SmartyTikiExtension.php
=====================================
@@ -1103,7 +1103,8 @@ class SmartyTikiExtension extends \Smarty\Extension\Base
// Use a static instance to ensure the expensive purifier setup runs only once per request.
static $purifier = null;
if ($purifier === null) {
- $config = \HTMLPurifier_HTML5Config::createDefault();
+ require_once('lib/htmlpurifier_tiki/HTMLPurifier.tiki.php');
+ $config = \HTMLPurifier_HTML5Config::inherit(\getHTMLPurifierTikiConfig());
// Define a strict security policy based on a whitelist of allowed elements and attributes.
$config->set('HTML.Allowed', 'a[href|title],b,strong,i,em,br,p,u');
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/1b4debf4ea1f08614227f51da50b7597dcd3e997
--
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/1b4debf4ea1f08614227f51da50b7597dcd3e997
You're receiving this email because of your account on gitlab.com. Manage all notifications: https://gitlab.com/-/profile/notifications | Help: https://gitlab.com/help
_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs