diff options
| author | Andy Staudacher <andy.st@gmail.com> | 2009-09-03 08:39:44 -0700 |
|---|---|---|
| committer | Andy Staudacher <andy.st@gmail.com> | 2009-09-03 08:39:44 -0700 |
| commit | 8f6a120b52360475859c361514500e46698f0e74 (patch) | |
| tree | e906232ab315e78c20c4edacd330f3e85d96f0ef /modules/gallery/libraries/SafeString.php | |
| parent | c4b449add1a64bc464f695248a2435afa81a437d (diff) | |
Ensure that purify isn't applied twice for an already purified SafeString
Diffstat (limited to 'modules/gallery/libraries/SafeString.php')
| -rw-r--r-- | modules/gallery/libraries/SafeString.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/gallery/libraries/SafeString.php b/modules/gallery/libraries/SafeString.php index 800647fa..e6f54add 100644 --- a/modules/gallery/libraries/SafeString.php +++ b/modules/gallery/libraries/SafeString.php @@ -51,7 +51,11 @@ class SafeString_Core { */ static function purify($string) { if ($string instanceof SafeString) { - $string = $string->unescaped(); + if ($string->_is_purified_html) { + return $string; + } else { + $string = $string->unescaped(); + } } $safe_string = self::of_safe_html(self::_purify_for_html($string)); $safe_string->_is_purified_html = true; |
