Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

made HTMLPurifier optional, in the case user already have it

  • Loading branch information...
commit 89037e26c73e9335824445a5ae790355432ef802 1 parent 7d5e186
@nibsirahsieu authored
View
20 config/app.yml
@@ -29,12 +29,14 @@ all:
url_commentable_method: false # static method or function to generate the url to show the commentable object (example: module/action?slug=symfony-is-rock)
# example value: [sfSimpleBlogTools, generatePostUri]
use_packaged_style: true # use plugin's stylesheet
- allowed_tags:
- a: <a>
- blockquote: <blockquote>
- code: <code>
- em: <em>
- i: <i>
- p: <p>
- strong: <strong>
- pre: <pre>
+ purifier:
+ default_package: true # use default plugin's html purifier
+ allowed_tags:
+ a: <a>
+ blockquote: <blockquote>
+ code: <code>
+ em: <em>
+ i: <i>
+ p: <p>
+ strong: <strong>
+ pre: <pre>
View
8 config/sfNestedCommentPluginConfiguration.class.php
@@ -11,12 +11,18 @@ public function initialize()
{
$this->dispatcher->connect('routing.load_configuration', array('sfNestedCommentRouting', 'listenToRoutingLoadConfigurationEvent'));
}
+
if (in_array('sfNestedCommentAdmin', sfConfig::get('sf_enabled_modules', array())))
{
$this->dispatcher->connect('routing.load_configuration', array('sfNestedCommentRouting', 'addRouteForNestedCommentAdmin'));
}
+
sfOutputEscaper::markClassAsSafe('sfNestedCommentsRenderer');
- self::registerHTMLPurifier();
+
+ if (sfNestedCommentConfig::isUsePluginPurifier())
+ {
+ self::registerHTMLPurifier();
+ }
}
}
View
9 lib/sfNestedCommentConfig.class.php
@@ -78,9 +78,16 @@ static public function getUrlCommentableCallable()
static public function getAllowedTags()
{
- return sfConfig::get('app_sfNestedComment_allowed_tags', array());
+ $purifierConfig = sfConfig::get('app_sfNestedComment_purifier');
+ return $purifierConfig['allowed_tags'];
}
+ static public function isUsePluginPurifier()
+ {
+ $purifierConfig = sfConfig::get('app_sfNestedComment_purifier');
+ return $purifierConfig['default_package'];
+ }
+
static public function isUsePluginStylesheet()
{
return sfConfig::get('app_sfNestedComment_use_packaged_style', true);
Please sign in to comment.
Something went wrong with that request. Please try again.