note 70964 modified in function.htmlentities by felipe
| From: | felipe@php.net | Date: | Sun, 10 Feb 2008 14:56:35 +0000 |
| Subject: | note 70964 modified in function.htmlentities by felipe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-135990@lists.php.net to get a copy of this message | ||
If you are building a loadvars page for Flash and have problems with special chars such as "
& ", " ' " etc, you should escape them for flash:
Try trace(escape("&")); in flash' actionscript to see the escape code for &;
% = %25
& = %26
' = %27
<?php
function flashentities($string){
return
str_replace(array("&","'"),array("%26","%27"),$string);
}
?>
Those are the two that concerned me. YMMV.
--was--
If you are building a loadvars page for Flash and have problems with special chars such as "
& ", " ' " etc, you should escape them for flash:
Try trace(escape("&")); in flash' actionscript to see the escape code for &;
& = %26
' = %27
<?php
function flashentities($string){
return
str_replace(array("&","'"),array("%26","%27"),$string);
}
?>
Those are the two that concerned me. YMMV.
http://php.net/manual/en/function.htmlentities.php