Created
June 17, 2013 14:04
-
-
Save JumboLove/5797105 to your computer and use it in GitHub Desktop.
Remove HTML from a string
This file contains hidden or 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
| function getShortDescription(product : Product) { | |
| var description : String = product.getLongDescription().toString(); | |
| var htmlTest : RegExp = new RegExp("(<([^>]+)>)", "ig"); | |
| description = description.replace(htmlTest, ""); | |
| return description; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment