Diff for phpPlatonLib/common/str/Attic/fnc.escape_email.php between version 1.1 and 1.2
| version 1.1, 2002/09/25 17:34:07 |
version 1.2, 2002/09/26 20:04:35 |
|
|
| if (! defined('phpPlatonLib_fnc_escape_email')) { |
if (! defined('phpPlatonLib_fnc_escape_email')) { |
| define('phpPlatonLib_fnc_escape_email', 1); |
define('phpPlatonLib_fnc_escape_email', 1); |
| |
|
| function escape_email($email, $mode = 'create_hypertext') |
function escape_email($email, $mode = 'create_hypertext', $attributes = '') |
| { |
{ |
| /* Code borrowed from Smarty template engine; |
/* Code borrowed from Smarty template engine; |
| Smarty-2.1.0/plugins/modifier.escape.php file */ |
Smarty-2.1.0/plugins/modifier.escape.php file */ |
| Line 44 if (! defined('phpPlatonLib_fnc_escape_e |
|
| Line 44 if (! defined('phpPlatonLib_fnc_escape_e |
|
| |
|
| default: |
default: |
| case 'create_hypertext': |
case 'create_hypertext': |
| $ret = '<a href="mailto:' |
is_array($attributes) && $attributes = join(' ', $attributes); |
| |
$attributes != '' && $attributes .= ' '; |
| |
$ret = '<a '.$attributes.'href="mailto:' |
| . escape_email($email, 'url') . '">' |
. escape_email($email, 'url') . '">' |
| . escape_email($email, 'html') . '</a>'; |
. escape_email($email, 'html') . '</a>'; |
| break; |
break; |
Platon Group <platon@platon.org> http://platon.org/
|
|