RE: [PHP] htmlspecialchars()

From: Date: Thu, 25 Mar 2004 20:59:54 +0000
Subject: RE: [PHP] htmlspecialchars()
Groups: php.general 
Request: Send a blank email to php-general+get-181509@lists.php.net to get a copy of this message
Anthony Ritter <mailto:tony@gonefishingguideservice.com> on Thursday, March 25, 2004 12:41 PM said: ok first of all your email was pretty confusing.... until i read the entire thing! not that it's long, but that you sign off before you're even done with it. but i digress... > $new = htmlspecialchars("<a href='test'>Test</a>", ENT_QUOTES); > echo $new; > > // this is what is output:<a href='test'>Test</a> > // instead of this... > // &lt;a href=&#039;test&#039;&gt;Test&lt;/a&gt; when you say "output" do you mean, what you see in the browser, or what you see when you view source? &lt; is going to appear as a < in the browser. if you view source you should see &lt;. please specify. chris.

« previous php.general (#181509) next »