Re: htdig: backslashes in the search results page

Tim Maroney (
Tue, 28 Apr 1998 19:42:15 -0700

>2) Make sure all your javascript code is properly commented out using <!--
>and -->

It is. The problem is that backslash-quote is getting mapped to just
quote, even inside comments. Here's the section that's having problems.
Needless to say losing the backslashes makes this fail rather horribly,
as strings are prematurely terminated.

<SCRIPT LANGUAGE="JavaScript"><!--
if (window.suppressScript)
        document.write("<BODY background=\"Images/paperback.jpg\">")
        // use the SRC tag
        // the string break is because Mac Explorer searches for the end script
tag stupidly
        // and would find it here if given half a chance
        document.write("<SCRIPT LANGUAGE=\"JavaScript\" SRC=\"prefs.js\"></SC" +

(By the way, yes, I know this is awkward. The problem is that Explorer 3
throws an error alert when it sees the SRC attribute. That's not
acceptable UI so I have to use this indirect way of putting out a SCRIPT
tag with the SRC attribute only on supported browsers. Otherwise this
could be one line of SCRIPT tag and all the logic could be in

Tim Maroney
"The world is made possible, in part, by murk."

---------------------------------------------------------------------- To unsubscribe from the htdig mailing list, send a message to containing the single word "unsubscribe" in the body of the message.

This archive was generated by hypermail 2.0b3 on Sat Jan 02 1999 - 16:26:03 PST