From: Stefano Zacchiroli Date: Mon, 2 Dec 2002 16:12:18 +0000 (+0000) Subject: - bugfix use Netconding.Url.encode instead of trivial home made encoding X-Git-Tag: V_0_0_6~15 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=b7be7508e19284861209a62e0b8415e0aef21d02;p=helm.git - bugfix use Netconding.Url.encode instead of trivial home made encoding --- diff --git a/helm/uwobo/src/ocaml/uwobo_logger.ml b/helm/uwobo/src/ocaml/uwobo_logger.ml index 0a27ee264..c2f69eecc 100644 --- a/helm/uwobo/src/ocaml/uwobo_logger.ml +++ b/helm/uwobo/src/ocaml/uwobo_logger.ml @@ -68,13 +68,7 @@ class sysLogger ?(level: priority = `Notice) () = (** non thread safe, a processingLogger is usually instantied locally for each thread *) -class processingLogger = - let html_escape s = (* TODO too naive, use Nethtml.encode instead *) - Pcre.replace ~pat:"<" ~templ:"<" - (Pcre.replace ~pat:">" ~templ:">" - (Pcre.replace ~pat:"&" ~templ:"&" s)) - in - fun () -> +class processingLogger () = object val mutable log_lines: string list = [] method log msg = log_lines <- msg :: log_lines @@ -84,6 +78,6 @@ class processingLogger = "\n%s\n" (String.concat "
\n" - (List.map html_escape (List.rev log_lines))) + (List.map (Netencoding.Url.encode ~plus:false) (List.rev log_lines))) end