Re: Re: Need a nicer way to escape single/double quotes....
| From: | Scott Fletcher | Date: | Thu, 13 Nov 2003 14:07:38 +0000 |
| Subject: | Re: Re: Need a nicer way to escape single/double quotes.... | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-169487@lists.php.net to get a copy of this message | ||
>Wow! That really help for a not so effective HTML tag...
"Wow! That does really help to make up for the lousy HTML tags..." Does
that help? :-)
Scott F.
"Scott Fletcher" <scott@abcoa.com> wrote in message
news:20031112222025.28467.qmail@pb1.pair.com...
> Wow! That really help for a not so effective HTML tag...
>
> Thanks!
> Scott F.
>
> "Cpt John W. Holmes" <holmes072000@charter.net> wrote in message
> news:002701c3a968$9767c8c0$a629089b@TBHHCCDR...
> > "Scott Fletcher" <scott@abcoa.com> wrote in message
> > news:<20031112213737.42755.qmail@pb1.pair.com>...
> >
> >
> >
> > > I haven't found a more efficient way to better escape the quote
> >
> > > characters for the javascript right from PHP because I only get "The
> kid"
> > in
> >
> > > the javascript alert message, so I'm wondering if anyone of you know
of
> >
> > > something better than that...
> >
> > >
> >
> > > --snip--
> >
> > > <form name="Test_Form">
> >
> > > <?
> >
> > > $test1 = "The kid's name is \"Bob!\"";
> >
> >
> >
> > $test1 = htmlentities($test1,ENT_QUOTES);
> >
> >
> >
> > instead of addslashes.
> >
> >
> >
> > > echo "<input type='hidden' name='htmlTest1'
value='".$test1."'>";
> >
> >
> >
> > ---John Holmes...