<div class="gmail_quote"><br><br>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></div><br>