tedd wrote: > At 2:29 AM -0700 6/28/06, Ryan A wrote: >> -snip- >> >> Or if I am barking up the wrong tree and this is not >> possible (changing DWs default behavior, just tell me >> and will stop searching. >> >> Thanks! >> Ryan > > Ryan: > > I don't see a problem with using: > > 1. Turn magic_quotes OFF -- it's just a PITA anyway. if magic_quotes_gpc is on in the php.ini and you don;t have the access to change this then you have a problem if your code doesn't do something to counter it. > > 2. Then use mysql_real_escape_string() to store your html in the dB. agreed. > > 3. Then use htmlentities() to retrieve the pages. grand. so then he'll have stuff like '>body<' probably not what he wants - granted you can use regular expressions to change all the content *between* the tags he actually wants to output which be closer to the to what he might want but even then you have to be careful not to 'entitize' stuff that was already existing as html entities in the data coming from the DB otherwise he ends up with stuff like: '&lt; &amp; &gt; are characters with special meaning in HTML and should be html encoded as &amp;lt; &amp;amp; &amp;gt;'. I guess now is not the time to freak Ryan with all the potential problems related to charset encoding :-) > > It works for me. > > tedd -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php