ColdFusion Comments
ColdFusion Comments
Comments in ColdFusion are enclosed by <!--- --->. CSE HTML Validator flags these ColdFusion comments as errors even when Flag 116 is disabled.
- Albert Wiersch
- Site Admin
- Posts: 3785
- Joined: Sat Dec 11, 2004 9:23 am
- Location: Near Dallas, TX
- Contact:
Re: ColdFusion Comments
Hello,
Can you post a sample code section that reproduces the problem? Thank you.
Can you post a sample code section that reproduces the problem? Thank you.
Albert Wiersch, CSS HTML Validator Developer • Download CSS HTML Validator FREE Trial
Re: ColdFusion Comments
<table border="0" cellpadding="0" cellspacing="0" width="800">
<tr>
<!--- This is a ColdFusion Comment that is flagged as an error --->
<td><img src="images/spacer.gif" width="1" height="1" border="0" alt=""></td>
<td><img src="images/spacer.gif" width="198" height="1" border="0" alt=""></td>
.
.
.
<tr>
<!--- This is a ColdFusion Comment that is flagged as an error --->
<td><img src="images/spacer.gif" width="1" height="1" border="0" alt=""></td>
<td><img src="images/spacer.gif" width="198" height="1" border="0" alt=""></td>
.
.
.
- Albert Wiersch
- Site Admin
- Posts: 3785
- Joined: Sat Dec 11, 2004 9:23 am
- Location: Near Dallas, TX
- Contact:
Re: ColdFusion Comments
Thank you. This should be addressed in the next v11 BETA.
In the meantime, disabling that message by right-clicking on it when displayed in the Results Window of CSE HTML Validator should disable it, but that would also disable it for non-ColdFusion comments.
If you'd like, I believe this can also be addressed by appending to the onConfigLoad() function in the 'Functions' program of the config file using the Configuration Editor in the pro or higher edition. If you'd like to do it this way, then please let me know and I will provide the details.
In the meantime, disabling that message by right-clicking on it when displayed in the Results Window of CSE HTML Validator should disable it, but that would also disable it for non-ColdFusion comments.
If you'd like, I believe this can also be addressed by appending to the onConfigLoad() function in the 'Functions' program of the config file using the Configuration Editor in the pro or higher edition. If you'd like to do it this way, then please let me know and I will provide the details.
Albert Wiersch, CSS HTML Validator Developer • Download CSS HTML Validator FREE Trial
Re: ColdFusion Comments
Yes. I would like the details of appending to the onConfigLoad(). Thank you.
- Albert Wiersch
- Site Admin
- Posts: 3785
- Joined: Sat Dec 11, 2004 9:23 am
- Location: Near Dallas, TX
- Contact:
Re: ColdFusion Comments
Sure. Please try appending the following to the end of the onConfigLoad() function in the "Functions" program in the Configuration Editor->Programs tab. Be sure to go to the Programs tab and check the "Functions" radio button then find the onConfigLoad() function and insert the code into the function at the end - just before the final '}' that ends the function.kennedyrt wrote:Yes. I would like the details of appending to the onConfigLoad(). Thank you.
Please note that the config will need to be reloaded for the changes to take effect. Also, I recommend that you save your custom config to another filename.
Please let me know how it works. Note that it requires flag 116 to be unchecked.
Code: Select all
setValueString(6,"#cc=true;
if beginsWithCase($commentstring,'!---') { if !isFlagSet(116) { #cc=false; } }
if #cc {
if checkStringEx(0,5,$commentstring) {
MessageEx(13,2006082303,$MSG_ERROR,'The HTML 4.01 specification states that it is a common error to include two or more adjacent hyphens in comments (between <!-- and -->). This also applies to XHTML. To prevent possible problems, always avoid using a string of hyphens within a comment. More compliant browsers like Firefox may (and probably will) consider the comment ended as soon as two adjacent hyphens are used. Also, avoid nesting comments.',getLocation(7,0));
}
if checkStringEx(0,6,$commentstring) {
MessageEx(13,2003031401,$MSG_WARNING,'The HTML 4.01 specification states that it is valid to include whitespace between '--' and '>' but this may cause problems because some browsers may not parse this correctly. We recommend that the whitespace be removed.',getLocation(2,2));
}
}");
Albert Wiersch, CSS HTML Validator Developer • Download CSS HTML Validator FREE Trial
Re: ColdFusion Comments
It doid work. Thank you.