问题
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?
回答1:
Use <h:outputText escape="false">
instead.
<h:outputText value="<!--[if IE]><link rel="stylesheet" type="text/css" href="ie.css"/><![endif]-->" escape="false" />
回答2:
You can do something like this:
<f:verbatim>
<!--[if lte IE 8]>
<script src="js/conditional-comment.js"></script>
<![endif]-->
</f:verbatim>
来源:https://stackoverflow.com/questions/10195310/jsf2-1-7-renders-if-ie-tag-as-text