NYCPHP Meetup

NYPHP.org

[nycphp-talk] MySQL/Flash/Apostrophe issue

David Krings ramons at gmx.net
Fri Dec 7 14:24:59 EST 2007


Ken Robinson wrote:
> Quoting Kristina Anderson <ka at kacomputerconsulting.com>:
> 
>> Yes it's definitely a flash issue.  I will replace the apostrophes in
>> the strings with &#39; before database insert and let you know how
>> that works!
> 
> Don't replace the single quotes in the database. Use the htmlentities() 
> function on the output with the ENT_QUOTES option. This will replace the 
> quotes (and other symbols) with the appropriate "&" strings.
> 
> Ken
> 

If memory serves me right, Flash doesn't adhere to the HTML or ASCII entities, 
at least it didn't a few years back when I ran into this issue. What I did is 
replace the characters with the ones that Flash understands before writing it 
to the database alongside with the properly escaped 'real' string. In my case 
the strings were pulled from an XML by Flash and not from a database, so that 
and the fact that my encounters are years past may put a different spin on 
this. So if you get something, but not what you expected, this could be the 
reason why.


David



More information about the talk mailing list