escape html \n and \r

This commit is contained in:
David Botton 2022-07-20 23:12:17 -04:00
parent 26d120bdc5
commit ae6cdb7580

View file

@ -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 "&#x0D"))) ; \r
(t
(setf res (ppcre:regex-replace-all "\\x22" res "\\x22")) ; "
(setf res (ppcre:regex-replace-all "\\x27" res "\\x27")) ; '