fix encoding of html entities

This commit is contained in:
David Botton 2022-07-19 23:22:28 -04:00
parent da0d3b3c62
commit 52e2bbe6f3
2 changed files with 3 additions and 2 deletions

View file

@ -150,8 +150,8 @@ and not for security purposes or html escapes."
(setf res (format nil "~@[~A~]" str))
(setf res (ppcre:regex-replace-all "\\x5C" res "\\x5C")) ; \
(cond (html
(setf res (ppcre:regex-replace-all "\\x22" res "&#x22")) ; "
(setf res (ppcre:regex-replace-all "\\x27" res "&#x27")) ; '
(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
(t

View file

@ -325,6 +325,7 @@
`((:name "contents"
:setup ,(lambda (control td1 td2)
(declare (ignore td1))
(princ (inner-html control))
(let ((d1 (create-text-area td2 :value (inner-html control))))
(set-on-change d1 (lambda (obj)
(declare (ignore obj))