Jump to content

preg_replace Replace META Fresh ONLY!


Gayner

Recommended Posts

preg_replace .. Thanks for coming here..

 

But I need a preg_replace  that removes anything that has <meta or any type of html Refresh/JAVASCRIPT so When I allow it for my users they can use it but only works with html attributes like font color/etc..

 

I know it's something like this:

 

 

$stxt = str_replace("+", " ", $stxt);

 

Now Help me please.. I googled and found no answers do came here :D

Link to comment
https://forums.phpfreaks.com/topic/172534-preg_replace-replace-meta-fresh-only/
Share on other sites

$txt = (array) preg_replace('/\<(meta|script).+\>/', '', $txt);

 

Wow really?

 

im about to try this..

 

thanks a bunch..

this will be epic our users will have alot of more free time to beable to use whatever they want

 

do i have to have array?

 

No.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.