[cl-who-devel] Changing *attribute-quote-char*

Jens Teich info at jensteich.de
Tue Aug 12 22:21:11 UTC 2008


Andrei Stebakov schrieb:
> By default the variable is initialized to #\'
> If I want to change it to #\" via local binding I still get the single 
> quotes in the resulting string.
> 
> (let ((*attribute-quote-char* #\"))
>   (with-html-output-to-string (*standard-output* nil :prologue nil 
> :indent nil)
>     (:html
>      (:head
>       (:title "title")
>       (:meta :name "DESCRIPTION" :content "description")
>       (:meta :name "KEYWORDS" :content "keywords")))))
> 
> I get:
> "<html><head><title>title</title><meta name='DESCRIPTION' 
> content='description' /><meta name='KEYWORDS' content='keywords' 
> /></head></html>"


I get the correct result evaluating exactly your form:

CL-WHO 507 >
(let ((*attribute-quote-char* #\"))
   (with-html-output-to-string (*standard-output* nil :prologue nil 
:indent nil)
     (:html
      (:head
       (:title "title")
       (:meta :name "DESCRIPTION" :content "description")
       (:meta :name "KEYWORDS" :content "keywords")))))
"<html><head><title>title</title><meta name=\"DESCRIPTION\" 
content=\"description\" /><meta name=\"KEYWORDS\" content=\"keywords\" 
/></head></html>"

LW 5.1
cl-who 0.11.0
Mac OS X 10.5

Jens



More information about the Cl-who-devel mailing list