simon551 Posted June 20, 2007 Share Posted June 20, 2007 Hi, does anyone know of a good function to escape all illegal characters? I've been writing a bunch of string_replace functions for each of my files and it is getting pretty tedious and I don't know if I am even catching all the possible (or even likely) problems $row['project'] = str_replace("&", "&", $row['project']); $row['project'] = str_replace("<", "-", $row['project']); $row['project'] = str_replace(">", "-", $row['project']); $row['internalNote'] = str_replace("/", ".", $row['internalNote']); $row['internalNote'] = str_replace("&", "&", $row['internalNote']); $row['vendor'] = str_replace("&", "&", $row['vendor']); $row['description'] = str_replace("&", "&", $row['description']); Link to comment https://forums.phpfreaks.com/topic/56448-escape-illegal-xml-characters/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.