|
Server : Apache/2.2.2 (Fedora) System : Linux App1.pathumtani.go.th 2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686 User : apache ( 48) PHP Version : 5.2.9 Disable Function : NONE Directory : /proc/self/root/var/www/html/phpMyAdmin/libraries/ |
Upload File : |
<?php
/* $Id: sanitizing.lib.php,v 2.1 2005/08/22 21:00:52 nijel Exp $ */
// vim: expandtab sw=4 ts=4 sts=4:
/**
* Sanitizes $message, taking into account our special codes
* for formatting
*
* @param string the message
*
* @return string the sanitized message
*
* @access public
*/
function PMA_sanitize($message)
{
$replace_pairs = array(
'<' => '<',
'>' => '>',
'[i]' => '<i>',
'[/i]' => '</i>',
'[b]' => '<b>',
'[/b]' => '</b>',
'[tt]' => '<tt>',
'[/tt]' => '</tt>',
'[br]' => '<br />',
'[/a]' => '</a>',
);
return preg_replace('/\[a@([^"@]*)@([^]"]*)\]/', '<a href="\1" target="\2">', strtr($message, $replace_pairs));
}
?>