beermaker74 Posted February 15, 2007 Share Posted February 15, 2007 is there a function that strips special characters. I already have it where it replaces spaces with underscores. I have been having problems with the & I am sure that there are a tremendous amount of special chars that will mess up my xml. So if there is something quick that can strip them please let me know thanks Quote Link to comment Share on other sites More sharing options...
Jenk Posted February 15, 2007 Share Posted February 15, 2007 htmlspecialchars() or htmlentities() Quote Link to comment Share on other sites More sharing options...
trq Posted February 15, 2007 Share Posted February 15, 2007 You might look at using htmlspecialchars to change special characters into there html counterparts. Quote Link to comment Share on other sites More sharing options...
php_joe Posted February 15, 2007 Share Posted February 15, 2007 you could use preg_replace() or str_replace() to remove characters that you don't want. Quote Link to comment Share on other sites More sharing options...
beermaker74 Posted February 15, 2007 Author Share Posted February 15, 2007 is there a list of special chars that will mess up a linux system? I am creating xml with the files so I need to make sure everything is compliant. If I used str replace do I need to list every character? I was hoping there was some function that automatically did it. thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.