^Status|Draft| ^Todo|Proof read| ====== Security Helper ====== The security helper offers various methods that assist with input filtering. ===== Methods ===== ==== xss_clean() ==== 'xss_clean' behaves the same as [[libraries:input#xss_clean]] in the Input library. * [string] String to be cleansed ==== strip_image_tags() ==== 'strip_image_tags()' strips the image tags out of a string and returns the string trimmed without the image tags. * [string] String to be stripped $string = 'Check this image: '; print Kohana::debug(security::strip_image_tags($string)); It will result in HTML as: Check this image: http://www.example.com/example.jpg ==== encode_php_tags() ==== 'encode_php_tags' replaces PHP tags in a string with their corresponding HTML entities. * [string] String to santize $string = 'Hello World!" ?>'; print Kohana::debug(security::encode_php_tags($string)); It will result in HTML as: <?php echo "Hello World!" ?>