Email and phone links in Knowledge Base articles, documents and ticket replies: purifierUriSchemes lets mailto and tel through HTMLPurifier wherever it is set up, which had allowed only http, https and data, and database update 4.4.5 makes the HTML of Markdown articles and documents with such links again, keeping when they were updated; 26.12.6 changelog

This commit is contained in:
johnnyq
2026-12-05 01:22:28 -05:00
parent 7ea52c95a8
commit 332b444c7b
9 changed files with 73 additions and 7 deletions

View File

@@ -20,7 +20,7 @@ require "../libs/htmlpurifier/HTMLPurifier.standalone.php";
$purifier_config = HTMLPurifier_Config::createDefault();
$purifier_config->set('Cache.DefinitionImpl', null); // Disable cache by setting a non-existent directory or an invalid one
$purifier_config->set('URI.AllowedSchemes', ['data' => true, 'src' => true, 'http' => true, 'https' => true]);
$purifier_config->set('URI.AllowedSchemes', purifierUriSchemes());
$purifier = new HTMLPurifier($purifier_config);
$ticket_id = intval($_GET['id'] ?? 0);