Commit 414a6128 authored by gerd's avatar gerd

Anti-SPAM: Escaping characters @ and :


git-svn-id: https://godirepo.camlcity.org/svn/app-presentation/trunk@9 50e5f3cf-a9f2-0310-83d8-d11ec64cb5ab
parent 2cc567e6
(* $Id: to_html.ml,v 1.6 2003/02/24 01:24:47 gerd Exp $
(* $Id: to_html.ml,v 1.7 2003/03/23 21:11:06 gerd Exp $
* ----------------------------------------------------------------------
*
*)
......@@ -12,7 +12,7 @@ let map'n'concat f l =
String.concat "" (List.map f l)
;;
let escape_html_re = (Pcre.regexp "\\<|\\>|\\&|\\\"");;
let escape_html_re = (Pcre.regexp "\\<|\\>|\\&|\\\"|\\@|\\:");;
let escape_html s =
let s' =
......@@ -25,6 +25,8 @@ let escape_html s =
| ">" -> "&gt;"
| "&" -> "&amp;"
| "\"" -> "&quot;"
| "@" -> "&#64;" (* protect mail addresses (anti-spam) *)
| ":" -> "&#58;" (* protect mailto links (anti-spam) *)
| _ -> assert false)
s
in
......@@ -1132,6 +1134,9 @@ let tag_map =
* History:
*
* $Log: to_html.ml,v $
* Revision 1.7 2003/03/23 21:11:06 gerd
* Anti-SPAM: Escaping characters @ and :
*
* Revision 1.6 2003/02/24 01:24:47 gerd
* New: to_latex
*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment