From b7be7508e19284861209a62e0b8415e0aef21d02 Mon Sep 17 00:00:00 2001 From: Stefano Zacchiroli Date: Mon, 2 Dec 2002 16:12:18 +0000 Subject: [PATCH] - bugfix use Netconding.Url.encode instead of trivial home made encoding --- helm/uwobo/src/ocaml/uwobo_logger.ml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) 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 -- 2.39.2