You can submit a patch to make this a configurable parameter in MyFaces.

On 10/26/07, Randy Simon <[EMAIL PROTECTED]> wrote:
> Thanks for your reply.  I understand how the comment blocks work.
> However, in my case the HTML is being passed through a filter that is
> ignoring the content comment blocks.
>
> I grabbed the MyFaces source and found where this is being done.  It
> will put the JavaScript in comments if the content type of the page is
> XHTML.  Since I am using facelets, my content type is XHTML.  In
> addition, there does not seem to be a way to disable it.
>
> I think I can come up with another way to work around this.
>
> -----Original Message-----
> From: David Dyer [mailto:[EMAIL PROTECTED]
> Sent: Friday, October 26, 2007 5:05 AM
> To: MyFaces Discussion
> Subject: Re: Javascript wrapped in comment block
>
> You don't actually need to get rid of it. The html comment tags inside
> the javascript block will only be applied by browsers that don't
> understand the <script> tag (eg really old IE or Netscape, text only
> browsers etc...). It's actually considered good form to have them in.
>
> David
>
> Randy Simon wrote:
> >
> > Hi,
> >
> > I just switched from the RI to myfaces. I've noticed that all my
> > javascript blocks get wrapped in HTML-style comments.
> >
> > For example,
> >
> > <script type="text/javascript">
> >
> > var foo = 'bar';
> >
> > </script>
> >
> > Becomes
> >
> > <script type="text/javascript">
> >
> > <!--
> >
> > var foo = 'bar';
> >
> > //-->
> >
> > </script>
> >
> > Is there anyway to disable this?
> >
> > Thanks,
> >
> > Randy
> >
> >
> > Notice: This email message, together with any attachments, may contain
>
> > information of BEA Systems, Inc., its subsidiaries and affiliated
> > entities, that may be confidential, proprietary, copyrighted and/or
> > legally privileged, and is intended solely for the use of the
> > individual or entity named in this message. If you are not the
> > intended recipient, and have received this message in error, please
> > immediately return this by email and then delete it.
> >
> ------------------------------------------------------------------------
> >
> > No virus found in this incoming message.
> > Checked by AVG Free Edition.
> > Version: 7.5.503 / Virus Database: 269.15.10/1091 - Release Date:
> 24/10/2007 2:31 PM
> >
>
>
> Notice:  This email message, together with any attachments, may contain 
> information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated 
> entities,  that may be confidential,  proprietary,  copyrighted  and/or 
> legally privileged, and is intended solely for the use of the individual or 
> entity named in this message. If you are not the intended recipient, and have 
> received this message in error, please immediately return this by email and 
> then delete it.
>

Reply via email to