diff options
author | Timothy Warren <tim@timshomepage.net> | 2011-09-06 20:40:34 +0200 |
---|---|---|
committer | Timothy Warren <tim@timshomepage.net> | 2011-09-06 20:40:34 +0200 |
commit | f22ce8f368e64b1c343e06427e8dad1ab1cef2a4 (patch) | |
tree | f0552e9318a541e82c3375646fc870490d835e12 /system/core/Common.php | |
parent | 36fb8de7bf385036f3145dd1fbd9537f6a01ac36 (diff) | |
parent | 40d1a7684444f6a8eb4cda23d8822f0b258f0c3e (diff) |
Merge branch 'develop' of git://github.com/EllisLab/CodeIgniter 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 |