Fix content attribute with regard to backslashes.

This commit is contained in:
Shinmera 2017-01-31 10:28:56 +01:00
parent ce9a20e60e
commit e028d076ff
No known key found for this signature in database
GPG Key ID: E12B14478BE4C922
1 changed files with 9 additions and 1 deletions

View File

@ -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.