note 103578 modified in function.htmlspecialchars-decode by danbrown
| From: | danbrown@php.net | 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("<", ">", '&',
''', '"','<', '>'),
array("<",
">",'&','\'','"','<','>'),
htmlspecialchars_decode($string, ENT_NOQUOTES));
return $string;
}
?>
Before
<description><div class="google-ad1">
<script type='text/javascript'>
GA_googleFillSlot("EW_News_300x250");
</script>
</div>
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("<", ">", '&',
''', '"','<', '>'),
array("<",
">",'&','\'','"','<','>'),
htmlspecialchars_decode($string, ENT_NOQUOTES));
return $string;
}
Before
<description><div class="google-ad1">
<script type='text/javascript'>
GA_googleFillSlot("EW_News_300x250");
</script>
</div>
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