function ldap_slashes($str){
        $illegal=array("(",")","#"); // the + character has problems too, but it's an illegal character
        
        $legal=array();
        foreach ($illegal as $id => $char){ $legal[$id]="\\".$char; } //make up the array of legal chars
        
        $str=str_replace($illegal,$legal,$str); //replace them
        return ($str);
    }
function ldap_slashes($str){
        $illegal=array("(",")","#"); // the + character has problems too, but it's an illegal character
        
        $legal=array();
        foreach ($illegal as $id => $char){ $legal[$id]="\\".$char; } //make up the array of legal chars
        
        $str=str_replace($illegal,$legal,$str); //replace them
        return ($str);
    }
function ldap_slashes ( $ str ) { $ illegal = array ( "(" , ")" , "#" ) ; // the + character has problems too, but it's an illegal character $ legal = array ( ) ; foreach ( $ illegal as $ id => $ char ) { $ legal [ $ id ] = "\\" . $ char ; } //make up the array of legal chars $ str = str_replace ( $ illegal , $ legal , $ str ) ; //replace them return ( $ str ) ; }
this is just a list of characters with known problems and I'm trying not to strip out other languages
this is just a list of characters with known problems and I m trying not to strip out other languages