Skip to content

Instantly share code, notes, and snippets.

@vyspiansky
Created October 23, 2014 09:28
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vyspiansky/1fe39de5f19d51e793d4 to your computer and use it in GitHub Desktop.
Save vyspiansky/1fe39de5f19d51e793d4 to your computer and use it in GitHub Desktop.
PHP: delete all script tags from text
<?php
preg_replace('#<script(.*?)>(.*?)</script>#is', '', $html_text);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment