Please disregard. Problem fixed by not using str at all.<div><br></div><div><div>(defun tab (page active)</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> (with-html-output-to-string (*empty-stream*)</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span> (:li :id page</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> :class (when (string-equal page active) "active")</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span> (:a :href "#"</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> page))))</div><div><br></div><div><br></div><div>
<br><div class="gmail_quote">On Sat, Sep 10, 2011 at 11:37 AM, Alok Thapa <span dir="ltr"><<a href="mailto:i.gizmo@gmail.com">i.gizmo@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi all,<div><br></div><div>When I evaluate this on the repl, it works as expected:</div><div><br></div><div><div>(with-html-output-to-string (*empty-stream*)</div><div><span style="white-space:pre-wrap"> </span> (:li :id "hello"</div>
<div><span style="white-space:pre-wrap"> </span> :class "active"</div><div><span style="white-space:pre-wrap"> </span> (:a :href "#" </div><div><span style="white-space:pre-wrap"> </span> "hello")))</div>
<div>"<li id=\"hello\" class=\"active\"><a href=\"#\">hello</a></li>"</div></div><div><br></div><div>but when I convert it into a function, then it gives me this:</div>
<div><br></div><div><div>(defun tab (page active)</div><div><span style="white-space:pre-wrap"> </span> (with-html-output-to-string (*empty-stream*)</div><div><span style="white-space:pre-wrap"> </span> (:li :id (str page)</div>
<div><span style="white-space:pre-wrap"> </span> :class (when (string-equal page active) (str "active"))</div><div><span style="white-space:pre-wrap"> </span> (:a :href "#"</div>
<div><span style="white-space:pre-wrap"> </span> (str page)))))</div><div>TAB</div><div>(tab "home" "home")</div><div><br></div><div>"<lihome id=\"home\"active class=\"active\"><a href=\"#\">home</a></li>"</div>
</div><div><br></div><div><br></div><div>Is there something I am doing wrong? I've already tried substituting str with fmt and esc with no luck.</div><div><br></div><div>Thanks.</div><div><br></div><font color="#888888"><div>
Alok</div>
</font></blockquote></div><br></div></div>