Hello all, im trying to build a function here to replace certian CSS styles from a string
function remove_evil_styles($string) {
$evil_styles = array('filter','alpha');
foreach($evil_styles as $evil) {
if(eregi($evil,$string)) {
echo "found";
}
}
return $string;
}
$string = 'filter: black';
$string = remove_evil_styles($string);
echo $string;
In the script, if it finds the word filter: or alpha, it echos "Founds" ive tried to use eregi_replace, but couldnt ever get it to replace the words with nothing.
Im using this to filter out css styles that members use on their pages that cause IE to crash. So far ive found i need to remove filter, and alpha, i just need some help with this.
Thanks