From c393b70231858b0d86088088bfebd11081ae8bae Mon Sep 17 00:00:00 2001 From: paku Date: Mon, 11 Mar 2024 12:02:00 +0900 Subject: [PATCH] Fix exported symbols --- README.md | 11 ----------- src/escape.lisp | 6 +++--- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index fd20629..c21404d 100644 --- a/README.md +++ b/README.md @@ -316,17 +316,6 @@ The `HTML` element is a little special, it's with `` prefix to ma ;; ;; Escape the STRING if it's a STRING and escaping all charaters C that satisfied ;; (FUNCALL TEST C). Return the new STRING after escape. - -;; Function HTML-ESCAPE-CHAR-P CHAR -;; -;; Return T if CHAR is a CHARACTER that need to be escaped when HTML is UTF-8 encoded. -;; Return NIL otherwise. - -;; Function ATTR-VALUE-ESCAPE-CHAR-P CHAR -;; -;; Return T if CHAR is a CHARACTER that need to be escaped when as an attribute value. -;; Return NIL otherwise. - ``` ## Generate HTML string diff --git a/src/escape.lisp b/src/escape.lisp index 30ea371..4044f5e 100644 --- a/src/escape.lisp +++ b/src/escape.lisp @@ -1,8 +1,8 @@ (uiop:define-package #:piccolo/escape (:use #:cl) (:export #:*escape-html* - #:html-escape-char-p - #:attr-value-escape-char-p + #:*html-escape-map* + #:*attr-escape-map* #:escape-string #:escape-attrs-alist #:escape-children)) @@ -44,7 +44,7 @@ (defun escape-children (children) (mapcar (lambda (child) - (if (stringp child) + (if (and (stringp child) *escape-html*) (escape-string child *html-escape-map*) child)) children))