diff options
author | Michael Dennis <michaeljdennis@gmail.com> | 2011-08-29 19:06:59 +0200 |
---|---|---|
committer | Michael Dennis <michaeljdennis@gmail.com> | 2011-08-29 19:06:59 +0200 |
commit | 013f78dc6a878d7775aa2bbcef573934a6d88a72 (patch) | |
tree | 97ba05fd8e5efc066cb8f428744991fc628d207b /system/core/Common.php | |
parent | cb07a322bee5c5b0a551ab959c7475a1a702ad03 (diff) | |
parent | 70e61b5dc0b240c4a3341ca65ad9f2f5254df1b5 (diff) |
Merge remote-tracking branch 'upstream/develop' into develop
Diffstat (limited to 'system/core/Common.php')
-rw-r--r-- | system/core/Common.php | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/system/core/Common.php b/system/core/Common.php index db9fbeb9f..d79375475 100644 --- a/system/core/Common.php +++ b/system/core/Common.php @@ -132,9 +132,9 @@ if ( ! function_exists('load_class')) $name = FALSE; - // Look for the class first in the native system/libraries folder - // thenin the local application/libraries folder - foreach (array(BASEPATH, APPPATH) as $path) + // Look for the class first in the local application/libraries folder + // then in the native system/libraries folder + foreach (array(APPPATH, BASEPATH) as $path) { if (file_exists($path.$directory.'/'.$class.'.php')) { @@ -536,5 +536,29 @@ if ( ! function_exists('remove_invisible_characters')) } } +// ------------------------------------------------------------------------ + +/** +* Returns HTML escaped variable +* +* @access public +* @param mixed +* @return mixed +*/ +if ( ! function_exists('html_escape')) +{ + function html_escape($var) + { + if (is_array($var)) + { + return array_map('html_escape', $var); + } + else + { + return htmlspecialchars($var, ENT_QUOTES, config_item('charset')); + } + } +} + /* End of file Common.php */ /* Location: ./system/core/Common.php */
\ No newline at end of file |