There's a FactoryMaker in LiftRules that looks like it may do what you want -- 
try:

LiftRules.stripComments.default = () => false

-Ross

On Mar 4, 2010, at 1:38 AM, aw wrote:

> After fielding calls as to why my UI doesn't look correctly on IE, I
> discovered that Lift is doing an "optimization" in "production mode"
> that is effectively breaking my application's compatibility for IE...
> 
> To get around IE6 deficiencies, I am leveraging JQuery.  For example,
> if I have a CSS style that uses attribute selectors, like
> input[type=checkbox], IE6 ignores them, but I can get JQuery to apply
> the style.
> 
> Since this JavaScript applies to IE only, I wrap them in comments
> like:
> 
>    <!--[if IE 6]> <script type="text/javascript" id="ie6fix"> ... </
> script> <![endif]-->
> 
> Firefox and Chrome will ignore these, which is perfect, and only IE
> will pay attention (and suffer the overhead).
> 
> All was working fine in dev, then came time to roll out to production
> and I naturally specified -Drun.mode=production.  Surprisingly,
> "production mode" has an "optimization" that strips HTML comments from
> the output.  Generally, I think this is a great idea -- EXCEPT if we
> have IE specific comments responding to an IE browser.
> 
> Is there a way to modify the optimization so that IE specific comments
> are retained?  Alternatively, can I simply disable this optimization
> feature so that my IE users are OK?
> 
> How can I find out more about these "production mode optimizations"?
> Is there a list?
> 
> I have drilled into Props.scala and I read it very carefully.  I think
> of my environments as Dev/QA/Prod, but I think this translates best to
> Test/Staging/Production in Lift-speak.  I am expecting that
> "production mode optimizations" are applied to both Staging (aka QA)
> as well as Production -- because I need to validate actual production
> behavior.
> 
> Note that I am running 2.0-M2.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Lift" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/liftweb?hl=en.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.

Reply via email to