|
Posted by Bob on 10/20/06 15:51
Kimmo Laine wrote:
> "Bob" <bobr@whidbey.com> wrote in message
> news:1161307446.321192.22730@i42g2000cwa.googlegroups.com...
> >I accept text, add_slashes, and store it in my MySQL DB. When I display
> > the text, I normally strip_slashes and also strip_tags. This all works
> > excepts for a field with double quotes. e.g.
> >
> > "My Book's Title" is very simple
> >
> > When I display this field, it is totally blank. What's the solution?
>
> I suppose html_entities("My Book's Title"); would do the trick.
>
> If you have an input like <input type="trext" value=""My Book's Title"", the
> html parser assumes the value="", empty quotes, thus the totally blank input
> field.
Thanks Kimmo - you explained the problem AND found the solution.
htmlentities worked!
[Back to original message]
|