summaryrefslogtreecommitdiff
path: root/modules/gallery/libraries/SafeString.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2013-03-02 14:02:00 -0800
committerBharat Mediratta <bharat@menalto.com>2013-03-02 14:02:00 -0800
commita81e85d3f178ad9081a5e6191d8f99370fdde123 (patch)
tree6d4306e8e9b4edbcba700a1910d6d0a03ce0edde /modules/gallery/libraries/SafeString.php
parent0d05e91cd3c5050c25133c864f8b789f499d8e17 (diff)
parent9b9f1a7b07daecf2251770e4f49838f22cb58a2a (diff)
Merge pull request #176 from shadlaws/fix_2031
#2031 - Add class_exists() before method_exists() if class existence is unknown.
Diffstat (limited to 'modules/gallery/libraries/SafeString.php')
-rw-r--r--modules/gallery/libraries/SafeString.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gallery/libraries/SafeString.php b/modules/gallery/libraries/SafeString.php
index 31e9d31b..179cbd41 100644
--- a/modules/gallery/libraries/SafeString.php
+++ b/modules/gallery/libraries/SafeString.php
@@ -153,7 +153,7 @@ class SafeString_Core {
* Purify the string, removing any potentially malicious or unsafe HTML / JavaScript.
*/
private static function _purify_for_html($dirty_html) {
- if (method_exists("purifier", "purify")) {
+ if (class_exists("purifier") && method_exists("purifier", "purify")) {
return purifier::purify($dirty_html);
} else {
return self::_escape_for_html($dirty_html);