Page 1 of 1

what's the best way to handle single & double quotes?

Posted: Fri Apr 01, 2011 7:50 am
by someguyhere
I'm working on a plugin for wordpress, and one of the fields is a bio field. Is there a good/right way to safely turn regular quotes (like " or ') into curly quotes - and is there a way to turn the quotes pasted from Word into the appropriate quotes rather than them displaying as an unknown character?

Re: what's the best way to handle single & double quotes?

Posted: Fri Apr 01, 2011 9:50 am
by social_experiment
Wouldn't the following suffice : htmlentities($valueToEntitize, ENT_QUOTES)?

Re: what's the best way to handle single & double quotes?

Posted: Fri Apr 01, 2011 10:17 am
by someguyhere
No. That doesn't convert regular quotes into curly quotes.