user684434
user684434

Reputation: 1165

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

We upgraded our JSF to latest version 2.1. previously we were in JSF2.0.4. Our xhtml pages has Targeting IE Using Conditional Comments tag,which were not rendered as text.

But with new JSF2.1.7 this is being rendered as text in IE . Any ideas how to get around this issue?

Upvotes: 3

Views: 1629

Answers (2)

Benny Code
Benny Code

Reputation: 54890

You can do something like this:

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

Upvotes: 0

BalusC
BalusC

Reputation: 1109222

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" />

Upvotes: 5

Related Questions