I need the correct syntax for eregi_replace() to remove any style and javascript-calling attributes from a string.
Not real familiar with the function, but do this all the time. Have you tried the regex:
<[^ ]+[>]*>
That should work pretty well. It'll kill all your images and links, which you could probably fix with:
<[IA ]+[>]*>
Thats not what I'm really trying to do.
What I want is something that'll take a string like: <img src="picurl" onmouseover="javascript(@!#$);"> into: <img src="picurl">
nm, what you gave me was enought to figure it out.
this was the final product, in case someone else needs it...
$string = eregi_replace( "(onmouseover|onmouseout|onkey|onload|onclose)=['"][>]*['"]", "", $string );