HTML comments stripped from Jelly
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-22-2012 04:10 PM
Hi,
I've noticed HTML comments:
<!-- my html comment -->
get stripped from Jelly when rendered. This becomes a problem when using IE conditional statements to choose stylesheets/javascript:
<!--[if lte IE 7]><script></script><![endif]-->
Any thoughts on how I prevent HTML comments from being stripped or, use conditional IE statements in the CMS?
Cheers,
Ben
2 REPLIES 2

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-03-2012 09:52 AM
wrap that into CDATA tags in the XML file?
<![CDATA[
<!--[if lte IE 7]><script></script><![endif]-->
]]>
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-03-2012 05:55 PM
Thanks Tony,
works great!
Another solution was that I found that using html entities works when placed in a dynamic content block:
<!--[if gte IE 7]><!--><img src="/scs/logo.png" height="28" alt="Service Centre Online" /><!--<![endif]-->
This renders correctly in a browser:
<!--[if gte IE 7]><!--><img src="/scs/logo.png" height="28" alt="Service Centre Online" /><!--<![endif]-->
Your solution is cleaner though!
Cheers,
Ben