Jump to content

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?

$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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.