Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How Can I Output an HTML Comment in Compojure/Hiccup?

I'd like my program to output the following HTML:

<!--[if lt IE 8]><link rel="stylesheet" href="../blueprint/ie.css" type="text/css" media="screen, projection"><![endif]-->

Is there a way to output html comment literals with Hiccup?

like image 700
Chris Bilson Avatar asked May 25 '10 14:05

Chris Bilson


1 Answers

Just insert them. Maybe this is a little bit cheating, but it works...

user=> (html
         [:html
          [:head
           "<!--[if lt IE 8]>"
           [:link {:rel  "stylesheet"
                   :href "../blueprint/ie.css"
                   :type "text/css"
                   :media "screen,projection"}]
           "<![endif]-->"]])
<html><head><!--[if lt IE 8]><link href=\"../blueprint/ie.css\" media=\"screen,projection\" rel=\"stylesheet\" type=\"text/css\" /><![endif]--></head></html>
like image 119
kotarak Avatar answered Sep 24 '22 01:09

kotarak