<?php
function tagso($a){
$tags1 = array("<br/>","</a>","<a href=","<b>","<big>","<small>","<u>","<i>","</b>","</big>","</small>","</u>","</i>","<img","<p>","</p>");
$tags2 = array("+br/+","+/a+","+a","+b+","+big+","+small+","+u+","+i+","+/b+","+/big+","+/small+","+/u+","+/i+","+img","+p+","+/p+");
$a = str_replace($tags1,$tags2,$a);
$a=strip_tags($a);
$a=str_replace($tags2,$tags1,$a);
$a=str_replace('$','$$',$a);
$a=stripslashes($a);
$a=mysql_escape_string($a);
$a=strtr($a,array(chr(0)=>"",chr(1)=>"",chr(2)=>"",chr(3)=>"",chr(4)=>"",chr(5)=>"",chr(6)=>"",chr(7)=>"",chr(8)=>"",chr(11)=>"",chr(12)=>"",chr(14)=>"",chr(15)=>"",chr(16)=>"",chr(17)=>"",chr(18)=>"",chr(19)=>"",chr(20)=>"",chr(21)=>"",chr(22)=>"",chr(23)=>"",chr(24)=>"",chr(25)=>"",chr(26)=>"",chr(27)=>"",chr(28)=>"",chr(29)=>"",chr(30)=>"",chr(31)=>""));
$a=trim(addslashes($a));
return $a;}
?>