JSF2.1.7 displays the tag <! - [if IE]> as text

We have updated our JSF to the latest version 2.1. previously we were in JSF2.0.4. Our xhtml pages have a Targeting IE tag that uses conditional comment tags that did not display as text.

But with the new JSF2.1.7, it displays as text in IE. Any ideas how to get around this?

+3
source share
2 answers

Use <h:outputText escape="false">instead.

<h:outputText value="&lt;!--[if IE]&gt;&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;ie.css&quot;/&gt;&lt;![endif]--&gt;" escape="false" />
+5
source

You can do something like this:

<f:verbatim>
  <!--[if lte IE 8]>
    <script src="js/conditional-comment.js"></script>
  <![endif]-->
</f:verbatim>
0
source

All Articles