[Edit] Remove html Special Characters
This function removing html special code chars which is done by strip_tags in rss files in example
function remEntities($str) { if(substr_count($str, '&') && substr_count($str, ';')) { // Find amper $amp_pos = strpos($str, '&'); //Find the ; $semi_pos = strpos($str, ';'); // Only if the ; is after the & if($semi_pos > $amp_pos) { //is a HTML entity, try to remove $tmp = substr($str, 0, $amp_pos); $tmp = $tmp. substr($str, $semi_pos + 1, strlen($str)); $str = $tmp; //Has another entity in it? if(substr_count($str, '&') && substr_count($str, ';')) $str = remEntities($tmp); } } return $str; } |
This Page is Under Construction! - If You Want To Help Please Send your CV - Advanced Web Core (BETA)
© Advanced Web Core. All rights reserved