+ Start a Discussion
paul-lmipaul-lmi 

adding HTML comments to pages

We'd like to have some of our HTML-style comments actually render in the page vs. being stripped out by the VF compiler.  Is this possible?  

_Prasu__Prasu_

Do you want to render the HTML tags saved in the comment field as it is on VFPage?

Could you explain what you are trying to do?

paul-lmipaul-lmi

I want to render

 

<!-- some comment here -->

 

on the actual page, so that when I go to view source on that page, I can see that comment.  the VF compiler skips these comments now.

 

Also, this page is rendered as XML, so I cannot use any javascript to do it.

sean*harrisonsean*harrison

I need this, too. Our Google mini appliance takes real-time instructions from certain html comments in a page as it is indexing the content.   The compiler's <!--*******--> doesn't work so well.

tobibeertobibeer

Here's what worked for me in order to avoid those nasty asterisks [for whatever reason those were invented]...

 

<apex:outputText value="<" />!--
The comment
-->

 Cheers, Tobias.