Skip to content

Instantly share code, notes, and snippets.

@stevez
Created April 30, 2015 03:06
Show Gist options
  • Save stevez/b44d5fd4d0345fe19823 to your computer and use it in GitHub Desktop.
Save stevez/b44d5fd4d0345fe19823 to your computer and use it in GitHub Desktop.
strip javascript
class ScriptScrub {
def scrub(text) {
def regex = ~/(<script.*>)([\s\S]+)(<\/script>)/
def result = text.replaceAll(regex, "")
result
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment