Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let ESCAPE (s: string) =
- let rec REMOVE_TAGS (acc: string) (s: string) =
- let next (c: char) =
- try
- Some <| s.IndexOf(c)
- with
- | _ ->
- None
- match next('<'), next('>') with
- | Some i, Some j when i < j ->
- REMOVE_TAGS <| acc + s.Substring(0, i) <| s.Substring(j+1)
- | _, _ ->
- acc + s
- let res =
- s
- |> REMOVE_TAGS ""
- |> System.Web.HttpUtility.HtmlDecode
- res
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement