News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

garbage in javascript

Started by Piwaille, July 09, 2006, 03:03:54 AM

Previous topic - Next topic

Piwaille

hello

now that I know that double ] prevent me from posting... I will modify my message


Correcting my "SMF shoutbox"... I've notice some
<!-- // --><![CDATA[ and // ] ]> (double ] )

they are in javascripts (at least in the default theme)

<!-- // --> is at least useless (Inot showing nothing).


<![CDATA[ and // ] ]> may lead to buggus things in Javascript  :-\
Piwaille
le chant du vario est motorisé par SMF 1.1.15

Rudolf

Mind if I ask you to expand on the "buggus things"?
The CDATA tags are there for the X(HT)ML validation.
I will update all my mods in the next few weeks. Thanks for your patience.

SVG-Collapse (you need an SVG compliant browser)

Piwaille

#2
well .. I don't know about XML validation...
Just I know that these code isn't know by the JS interpreter.

I've read just a little after your answer.... and it appears I'm (quite) wrong... it is on the "modern way of coding JS"
I dislike validators :-\
is the code written for being interpreted by a validator or by a browser ?

note that looking for this for-validator-tag, I've read s/o that explained my fear:
QuoteThe problem is that some older web browsers don't understand the CDATA tag and so this breaks your Javascript in those web browsers.
http://javascript.about.com/library/blxhtml.htm

let say I'm just to old for those modern complexification  :(

PS: he (Stephen Chapman) give (on its page) a solution for both validator + old browser
but there no solution for old guys like me that started internet in the early 90's.
Piwaille
le chant du vario est motorisé par SMF 1.1.15

Rudolf

You mean you're still using Internet Explorer 3?
You mean you still using any of the versions of Internet Explorer?
Or you're using Mozilla 0.5, Opera 3, Firefox 0.5?
com'on
I will update all my mods in the next few weeks. Thanks for your patience.

SVG-Collapse (you need an SVG compliant browser)

Advertisement: