Need heavy duty character escaping

From: Date: Mon, 04 Nov 2013 21:21:34 +0000
Subject: Need heavy duty character escaping
Groups: php.general 
Request: Send a blank email to php-general+get-322419@lists.php.net to get a copy of this message
I'm still pulling out some XML and putting it into different formats. One issue I'm having right now is that one of the sections contains Linux commands, with pretty much every special character possible. When trying to write this so that section becomes a PHP string it chokes on the special characters. Most notably $, but also { } and [ ]. I've tried htmlspeciachars and addslashes, but need more. Using mysqli_real_escape_string seems to need a DB connection. Do I need to regex this or is there a better way? Thanks! Leam -- Mind on a Mission <http://leamhall.blogspot.com/>

« previous php.general (#322419) next »