From e028d076ff581e4a3631f5c22a3b56359bb87771 Mon Sep 17 00:00:00 2001 From: Shinmera Date: Tue, 31 Jan 2017 10:28:56 +0100 Subject: [PATCH] Fix content attribute with regard to backslashes. --- special.lisp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/special.lisp b/special.lisp index 33eae55..385f9af 100644 --- a/special.lisp +++ b/special.lisp @@ -141,7 +141,15 @@ (char= #\' (char content 0)) (char= #\' (char content (1- (length content))))) (setf content (subseq content 1 (1- (length content))))) - (list (make-property "content" (format NIL "~s" content)))) + (list (make-property "content" + (with-output-to-string (out) + (write-char #\" out) + (unwind-protect + (loop for char across content + do (when (char= char #\") + (write-char #\\ out)) + (write-char char out)) + (write-char #\" out)))))) (defmacro define-browser-property (name args &body browser-options) "Helper macro to define properties that have browser-dependant versions.