edicl/cl-who

Odd behavior in mess of nested tags

Closed this issue · 1 comments

I'm not sure if this is a bug or I'm doing something silly, I suspect the latter, but I'm curious to know the cause of this. I'm trying to create an h4 tag with some text in it and then a link, like this:
<h4>Foo <a href="/bar/21">&#x2795;</a></h4>

Foo

The code I'm using is such:

(with-html-output-to-string (*standard-output* nil)
    (:h4 (fmt "Foo ~A" 
        (htm (:a :href (format nil "/bar/~A" 21) "&#x2795;")))))

This produces the following output, with an extra '>' mixed in there, hings are all out of order, and some duplication occurs.

<h4><a href='/bar/21'>&#x2795;</a>Foo >&#x2795;</a></h4>

Foo >➕

I've tried all varieties of (str)/(htm)/(format)/(fmt) that I can think of.

Any guidance would be appreciated.

(with-html-output-to-string (*standard-output* nil)
    (:h4 "Foo " (:a :href (format nil "/bar/~A" 21) "&#x2795;")))