case 'urlpathinfo':
return str_replace('%2F','/',rawurlencode($string));
-
+
case 'quotes':
// escape unescaped single quotes
return preg_replace("%(?<!\\\\)'%", "\\'", $string);
$return .= '%' . bin2hex($string[$x]);
}
return $return;
-
+
+ case 'phone':
+ $return = str_replace('+','0',$string);
+ $return = preg_replace('/[^0-9]+/','',$return);
+ return $return;
+
case 'hexentity':
$return = '';
for ($x=0; $x < strlen($string); $x++) {
case 'javascript':
// escape quotes and backslashes, newlines, etc.
return strtr($string, array('\\'=>'\\\\',"'"=>"\\'",'"'=>'\\"',"\r"=>'\\r',"\n"=>'\\n','</'=>'<\/'));
-
+
case 'mail':
// safe way to display e-mail address on a web page
return str_replace(array('@', '.'),array(' [AT] ', ' [DOT] '), $string);
-
+
case 'nonstd':
// escape non-standard chars, such as ms document quotes
$_res = '';
{if $entry.phone}
<tr>
<th>{$lang.phone}:</th>
- <td>{$entry.phone|h}</td>
+ <td><a href="callto://{$entry.phone|escape:phone}">{$entry.phone|h}</a></td>
</tr>
{/if}
{if $entry.switchboard}
{if $entry.homephone}
<tr>
<th>{$lang.homephone}:</th>
- <td>{$entry.homephone|h}</td>
+ <td><a href="callto://{$entry.homephone|escape:phone}">{$entry.homephone|h}</a></td>
</tr>
{/if}
{if $entry.mobile}
<tr>
<th>{$lang.mobile}:</th>
- <td>{$entry.mobile|h}</td>
+ <td><a href="callto://{$entry.mobile|escape:phone}">{$entry.mobile|h}</a></td>
</tr>
{/if}
{if $entry.birthday}
<a href="index.php?org={$entry.organization|escape:url}">{$entry.organization|h}</a>
</td>
<td>
- {$entry.phone|h}
+ <a href="callto://{$entry.phone|escape:phone}">{$entry.phone|h}</a>
</td>
<td>
<a href="mailto:{$entry.mail[0]|h}">{$entry.mail[0]|h}</a>