JRS: In article <vf**********@hotpop.com>, seen in
news:comp.lang.javascript, Lasse Reichstein Nielsen <lr*@hotpop.com>
posted at Sun, 7 Sep 2003 22:14:28 :-
Dr John Stockton <sp**@merlyn.demon.co.uk> writes:
But there is at least one publicly-available tool which reads Web page
masters and which under at least some circumstances benefits from the
presence of <!-- and --> around script.
Don't leave us hanging in suspense! What is it? :)
A clue was in the third line of the signature (repeated).
CHEKLINK, running on a PC in 16- and 32- bit versions, will check the
relative links on [the master copy of] a Web site, recursively, to see
whether the file and/or anchor cited by each link actually exists in the
master. It checks a few other things /en passant/.
Since its high-speed scanner was written to ignore all bar a few HTML
elements, but naturally to recognise <!-- --> (acknowledged : perhaps
that is not the full generality of HTML comment; but it is all that I've
ever seen used), it is entirely ignorant of the contents of
traditionally-protected script (unless out of sheer folly a string
literal contains -->). But, without the protection, it may run out of
buffer length (and thus abort) while scanning script.
I think also that one version of W3's TIDY (HTML checker) could be led
astray by <a in unprotected script, where a is any letter and there is
no suitable matching > - I spent a while changing <a to < a to fix that,
after removing <!-- & -->.
But an advantage of removal is that CHEKLINX will then check the link in
document.write('<a href="filename.htm#anchor">GO</a>'). I do not know
how many of such I had that were satisfactory, but it did find one that
was not; the destination had moved.
Those show that the removal of the deprecated <!-- & --> is not
necessarily consequence-free.
--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 MIME. ©
Web <URL:http://www.merlyn.demon.co.uk/> - FAQqish topics, acronyms & links.
PAS EXE TXT ZIP via <URL:http://www.merlyn.demon.co.uk/programs/00index.htm>.
Do not Mail News to me. Before a reply, quote with ">" or "> " (SoRFC1036)