Loading and saving text containing ampersands?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Loading and saving text containing ampersands?

John Moore
Could do with a bit of quick help here. Got to do an emergency fix today and I'm running a bit of a fever and my brain is on super go-slow, so I'm asking a simple question I'm certain I normally know the answer to myself...

What do I need to do to ensure that a user can enter text containing an ampersand into a text field and have it save correctly into the MySQL db, and subsequently reload correctly as well? That is, the user types e.g.

'Smith & Jones'

and this gets saved verbatim in the MySQL column, and when it displays again on reload it's still 'Smith & Jones'? I'm getting things messed up with entities being substituted. I.e., on reload, the field is showing

'Smith & Jones'

Thanks!