Created
December 22, 2018 18:34
-
-
Save marcobraghim/c8aebffee42be03ae6211c00891002f6 to your computer and use it in GitHub Desktop.
Remove <script> tag
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** Remove <script> tag **/ | |
function string($value) { | |
return trim(preg_replace("#<\s*script[^>]*>((.*?)<\s*/\s*script>)?#i", '', $value)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment