function _Clean($value, $secureFlags) { if (!($secureFlags & M_XSS_FILTER_OFF)) { global $g_config; static $cleaner = NULL; if (is_null($cleaner)) { $cleaner = new InputClean($g_config['charset']); } $value = $cleaner->_clean_input_data($value); } if (!($secureFlags & M_HTML_FILTER_OFF)) { is_array($value) ? array_walk_recursive($value, "_HtmlClean") : _HtmlClean($value); } return $value; }
/** * Automatically adds <p> tags to content with line breaks * * Expected params: * - value string - to process * - allowedTags string - comma delimited list of tags to allow, e.g. a[href],b,p * - linkUrls bool - whether or not links should be auto converted to a tags. * * @return string */ public function autoParagraph() { $str = $this->getParameter('value'); $linkUrls = null === $this->getParameter('linkUrls') ? true : \StringUtils::strToBool($this->getParameter('linkUrls')); return $this->inputClean->autoParagraph($str, $this->getParameter('allowedTags'), $linkUrls); }