The Security Helper file contains security related functions.
This helper is loaded using the following code:
<?php
helper('security');
The following functions are available:
$filename (string) – Filename
$relativePath (bool) – Whether the relative path is acceptable (available since v4.6.2)
Sanitized file name
string
Provides protection against directory traversal.
For more info, please see the Security Library documentation.
$str (string) – Input string
The input string with no image tags
string
This is a security function that will strip image tags from a string. It leaves the image URL as plain text.
Example:
<?php
$string = strip_image_tags($string);
$str (string) – Input string
Safely formatted string
string
This is a security function that converts PHP tags to entities.
Example:
<?php
$string = encode_php_tags($string);