note 103578 modified in function.htmlspecialchars-decode by danbrown

From: Date: Wed, 20 Apr 2011 22:24:53 +0000
Subject: note 103578 modified in function.htmlspecialchars-decode by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-179032@lists.php.net to get a copy of this message
this function <?php function htmlkarakter($string) { $string = str_replace(array("&lt;", "&gt;", '&amp;', '&#039;', '&quot;','&lt;', '&gt;'), array("<", ">",'&','\'','"','<','>'), htmlspecialchars_decode($string, ENT_NOQUOTES)); return $string; } ?> Before <description>&lt;div class=&quot;google-ad1&quot;&gt; &lt;script type=&#039;text/javascript&#039;&gt; GA_googleFillSlot(&quot;EW_News_300x250&quot;); &lt;/script&gt; &lt;/div&gt; after using the function <div class="google-ad1"> <script type='text/javascript'> GA_googleFillSlot("EW_News_300x250"); </script> --was-- this function function htmlkarakter($string) { $string = str_replace(array("&lt;", "&gt;", '&amp;', '&#039;', '&quot;','&lt;', '&gt;'), array("<", ">",'&','\'','"','<','>'), htmlspecialchars_decode($string, ENT_NOQUOTES)); return $string; } Before <description>&lt;div class=&quot;google-ad1&quot;&gt; &lt;script type=&#039;text/javascript&#039;&gt; GA_googleFillSlot(&quot;EW_News_300x250&quot;); &lt;/script&gt; &lt;/div&gt; after using the function <div class="google-ad1"> <script type='text/javascript'> GA_googleFillSlot("EW_News_300x250"); </script> http://php.net/manual/en/function.htmlspecialchars-decode.php

« previous php.notes (#179032) next »