__('HTML Entity Encoder (htmlspecialchars)', __FILE__), // Module Title 'summary' => __("Entity encode ampersands, quotes (single and double) and greater-than/less-than signs using htmlspecialchars(str, ENT_QUOTES). It is recommended that you use this on all text/textarea fields except those using a rich text editor or a markup language like Markdown.", __FILE__), // Module Summary 'version' => 100, ); } public function format(&$str) { static $charset = false; if($charset === false) $charset = $this->config->dbCharset; if($charset == 'utf8') $str = htmlspecialchars($str, ENT_QUOTES, "UTF-8"); else $str = htmlspecialchars($str, ENT_QUOTES); } }