This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".
The branch, master has been updated
via 670d68828a0eee1931dc5ac50b1aef580e70fd8d (commit)
from d6afb416fc6e8d1a2a1af24fc4fadd48a2327b82 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=670d68828a0eee1931dc5ac50b1aef580e70fd8d
commit 670d68828a0eee1931dc5ac50b1aef580e70fd8d
Author: Roland Mas <[email protected]>
Date: Fri Jan 20 15:18:43 2017 +0100
Delay loading of HTMLPurifier until actually required
This fixes the building of RPM packages, because due to a long chain
of requires, TextSanitizer.class.php started being loaded during the
generation of the .spec file; however, at that stage, HTMLPurifier was
not necessarily installed yet. Since we want to keep the building of
our packages separate from the installation/backporting of their
dependencies, we need to be able to *load* this class (not necessarily
execute its relevant parts) even if HTMLPurifier is not there.
For the curious, the change happened in commit
21286d8f829554478d46b742b96309e1941159a7 when
ArtifactTypeHtml.class.php started including
EffortUnitFactory.class.php.
diff --git a/src/common/include/TextSanitizer.class.php
b/src/common/include/TextSanitizer.class.php
index c852a3c..65923c8 100644
--- a/src/common/include/TextSanitizer.class.php
+++ b/src/common/include/TextSanitizer.class.php
@@ -43,8 +43,6 @@
* ALONE BASIS."
*/
-require_once 'HTMLPurifier.auto.php';
-
class TextSanitizer extends FFError {
/**
@@ -220,6 +218,8 @@ class TextSanitizer extends FFError {
}
function stripTags($text, $allowed = 'br,p,li,ul') {
+ require_once 'HTMLPurifier.auto.php';
+
// Try apc caching first (if possible).
if (function_exists('apc_fetch')) {
$key = 'stripTags.'.md5($text);
@@ -242,6 +242,8 @@ class TextSanitizer extends FFError {
}
static function purify($text) {
+ require_once 'HTMLPurifier.auto.php';
+
// Remove string like "<![if !supportLists]>" or "<![endif]>"
$text = preg_replace('/<!\[.+?\]>/', '', $text);
// Remove non opened tags at the beginning
-----------------------------------------------------------------------
Summary of changes:
src/common/include/TextSanitizer.class.php | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
hooks/post-receive
--
FusionForge
_______________________________________________
Fusionforge-commits mailing list
[email protected]
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits