Re: Single quotes verses double quotes default behavior with DW --------> (Pretty much 0T )

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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:

	'< & > are characters with
	 special meaning in HTML and should be html encoded as
	 < & >'.

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux