function smartyModifierPPSafeoutputLenient($string, $type = null) { if ($type === null) { $type = 'html'; } switch ($type) { case 'html': return PP::safeOutputLenient($string); case 'js': case 'javascript': return PP::safeOutputLenientJS($string); case 'value': return PP::safeOutputLenientValue($string); default: return $string; } }