Added html_encode ()

This commit is contained in:
zone 2001-06-18 22:04:45 +00:00
parent 45d28847c8
commit a16f958a22

View File

@ -159,6 +159,18 @@ function string_decode ($string, $return)
return (eor ($rstring, $return)); return (eor ($rstring, $return));
} }
###
# HTML encode a string
# This should be used with anything in an HTML tag that might contain < or >
###
function html_encode ($string, $return)
{
$rstring = htmlspecialchars ($string);
return (eor ($rstring, $return));
}
function translate ($text) function translate ($text)
{ {
global $phpgw; global $phpgw;