Quick Nav:  Online Store   |   Login | Register

Remove HTML Comments Rule

Rate this topic:

Please Register to post a reply. Another benefit of registration is the ability to subscribe to and recieve notifications of new posts.
AuthorMessages
Will Strohl
<100 Posts
Posts:88


05/21/2008 7:27 PM  

I tried your HTML comment rule, but it was too inclusive.  It removed way too many sections of code, and cause our previous issue where PageBlaster and CSS Editor began to fail client-side.  Here is the rule:

< !--.*?-- >

Is there a better rule to remove only HTML comments?

John Mitchell
Posts:3353


05/21/2008 8:44 PM  

No, currently I don't have a better one.  It's a tough one because the html comments are used to "hide" javascript.

I'll spend a little time on it to see if I can come up with something better, but I'm afraid there will always be something that causes trouble.

 

John Mitchell
Posts:3353


05/22/2008 6:59 AM  
This one is a little less aggressive and will skip any html comment blocks that have a semi-colon:
(extra space at front needs to be removed)

< !--[^;]+-->
Will Strohl
<100 Posts
Posts:88


07/02/2008 8:37 AM  
Somehow, that becomes too inclusive too. Argh! I even tried this (extra space added):
\< !-{2}[^;]+-{2}\>
Please Register to post a reply. Another benefit of registration is the ability to subscribe to and recieve notifications of new posts.
Forums >Snapsis Product Support >PageBlaster > Remove HTML Comments Rule



ActiveForums 3.7
Powered by: Snapsis Software