Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <cffunction name="removeHTML" access="public" output="no" returntype="string">
- <cfargument name="text" default="" type="string">
- <cfset local.resstr = ReReplaceNoCase(arguments.text,"<[^>]*>","","ALL")>
- <cfset local.resstr = REReplace(local.resstr, "^[^>]*>", "", "ALL")> <!--- this is to remove invalid unclose HTML Tags --->
- <cfset local.resstr = REReplace(local.resstr, "<[^>]*$", "", "ALL")> <!--- this is to remove invalid unclose HTML Tags --->
- <cfset local.resstr = ReReplaceNoCase(local.resstr," {1,}"," ","ALL")>
- <cfset local.resstr = ReReplaceNoCase(local.resstr," {2,}"," ","ALL")>
- <cfreturn local.resstr />
- </cffunction>
Advertisement
Add Comment
Please, Sign In to add comment