Boy this place sure was quiet before I came here.
Just went thru 140 pages and updated all my inline JS to be similar to this:
<script type="text/javascript">
//<![CDATA[
function SavePrefs(){}
function LoadPrefs(){}
//]]>
</script>
... using example #4 from devedge-temp.mozilla.org.
I'm using a doctype of xhtml strict and a content type of "text/html".
I'm seeing this message:
"This document contains 1 CDATA section. Using CDATA sections is not recommended due to poor browser support (even some newer browsers fail to properly support it) and due to other complications. AI Internet Solutions recommends avoiding CDATA sections if possible."
The cdata I'm using is prefaced with comments, which is supposed to make it OK with older browsers.
Cdata statements
-
- Rank VI - Professional
- Posts: 596
- Joined: Mon Jun 09, 2008 2:12 pm
- Location: Fargo, ND
-
- Site Admin
- Posts: 3785
- Joined: Sat Dec 11, 2004 9:23 am
- Location: Near Dallas, TX
Thanks. I see that. I think the best thing that can be done now would be to change the message to something like this:
This document contains 1 CDATA section. Using CDATA sections is not recommended due to poor browser support (even some newer browsers fail to properly support it) and due to other complications. AI Internet Solutions recommends avoiding CDATA sections if possible or commenting them out (like in using "//<![CDATA[" and "//]]>" in a "script" element).
Does this sound good? Once an author is aware of this, then he/she can disable that message or just change it to a regular message instead of a warning message.
But I will also make a note look into not displaying this message if all CDATA sections are commented out (for a future version).
This document contains 1 CDATA section. Using CDATA sections is not recommended due to poor browser support (even some newer browsers fail to properly support it) and due to other complications. AI Internet Solutions recommends avoiding CDATA sections if possible or commenting them out (like in using "//<![CDATA[" and "//]]>" in a "script" element).
Does this sound good? Once an author is aware of this, then he/she can disable that message or just change it to a regular message instead of a warning message.
But I will also make a note look into not displaying this message if all CDATA sections are commented out (for a future version).
Albert Wiersch, CSS HTML Validator Developer • Download CSS HTML Validator FREE Trial
-
- Rank VI - Professional
- Posts: 596
- Joined: Mon Jun 09, 2008 2:12 pm
- Location: Fargo, ND
-
- Site Admin
- Posts: 3785
- Joined: Sat Dec 11, 2004 9:23 am
- Location: Near Dallas, TX
Great! The warning message now reads (for XHTML documents):RSteinwand wrote:Excellent.
Of course that's only if the content type is "text/html".
"This document contains 1 CDATA section. Using CDATA sections is not recommended due to poor browser support (even some newer browsers fail to properly support it) and due to other complications. AI Internet Solutions recommends avoiding CDATA sections if possible or commenting them out (for example, using "//<![CDATA[" and "//]]>" in a "script" element)."
HTML (not XHTML) documents will generate this error message:
"This document contains 1 CDATA section. CDATA sections should not be used in HTML, but may be used in XHTML (though it is not recommended due to poor browser support and due to other complications)."
If you see any further issues with this, then please let me know.
Albert Wiersch, CSS HTML Validator Developer • Download CSS HTML Validator FREE Trial
-
- Rank VI - Professional
- Posts: 596
- Joined: Mon Jun 09, 2008 2:12 pm
- Location: Fargo, ND
-
- Site Admin
- Posts: 3785
- Joined: Sat Dec 11, 2004 9:23 am
- Location: Near Dallas, TX
Nope, pick away... any comments to improve the program are welcome (especially if they are easy to do).RSteinwand wrote:Let me know if I'm wearing you down. I can be downright picky.
Albert Wiersch, CSS HTML Validator Developer • Download CSS HTML Validator FREE Trial