From ae6cdb7580de5605fd841647609cf58743de7331 Mon Sep 17 00:00:00 2001 From: David Botton Date: Wed, 20 Jul 2022 23:12:17 -0400 Subject: [PATCH] escape html \n and \r --- source/clog-utilities.lisp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/clog-utilities.lisp b/source/clog-utilities.lisp index 8c735c8..8f7a2c9 100644 --- a/source/clog-utilities.lisp +++ b/source/clog-utilities.lisp @@ -152,8 +152,8 @@ and not for security purposes or html escapes." (cond (html (setf res (ppcre:regex-replace-all "\\x22" res """)) ; " (setf res (ppcre:regex-replace-all "\\x27" res "'")) ; ' - (setf res (ppcre:regex-replace-all "\\x0A" res "")) ; \n - (setf res (ppcre:regex-replace-all "\\x0D" res ""))) ; \r + (setf res (ppcre:regex-replace-all "\\x0A" res " ")) ; \n + (setf res (ppcre:regex-replace-all "\\x0D" res " "))) ; \r (t (setf res (ppcre:regex-replace-all "\\x22" res "\\x22")) ; " (setf res (ppcre:regex-replace-all "\\x27" res "\\x27")) ; '