NetObjects
Products and Services Partners Support
Company Purchase
Repairing BBS Files

Introduction
When site visitors use your BBS, it is possible (through the text they enter into their message) to break the BBS. Once the BBS is broken, the site administrator must edit one file to get the BBS back up again. The culprit (and the only one known to date) is the double-quote character. If this character is entered into a Name or Subject field of a new message, the damage will occur. Fortunately, it's a simple matter to repair the BBS.

Double-Quote Entered in Name Field of New Message
You need to edit one file to repair this damage: bbs-data.html. Incorporating a second change in another file is cosmetic and affects the appearance of the posted message. Both changes are described below.

A note about editors: It is very important to use a suitable editor when modifying bbs-data.html. This file contains a single hidden character at the end of the <!--insertion point--> line. You must not use Windows Notepad; Notepad removes the required hidden character. When using other editors, do not edit the insertion point line. It would be a good idea to make a copy of the file before changing it. Numerous editors are available that will do the job; two on Windows systems that work correctly are DOS Edit and Windows WordPad. When using WordPad, be sure to save in text format using the Save As command. WordPad's default file format is Word 6.

Repairing the BBS is explained via an example. In this example two messages have been posted to the BBS. The first message is valid. The second one contains a double quote character at the end of the name the site visitor entered when creating the new message.

Each message is represented in bbs-data.html by a parent.addpbbsArray entry in function ship. parent.addpbbsArray contains a reference to an html file that contains the posted message. The following is the contents of bbs-data.html for this example:

<html>
<META HTTP-EQUIV="Expires" CONTENT="Tue, 04 Dec 1993 23:59:00 GMT">
<HEAD>
<script language="JavaScript">
<!-- hide

function ship(){
parent.addpbbsArray("test 01","861383399050",
"Fri, 18 Apr 1997 17:09:59 GMT",
"Tom",1,"message/0.html","1","0")parent.addpb bsArray("test 02","861383873600",
"Fri, 18 Apr 1997 17:17:53 GMT",
"Tom"",2,"message/1.html","1","1")
<!--insertion point-->
parent.init();
}
var state = parent.readCookie("netobjects_bbs_view_mode") ;
if (state==""){
state="Thread";
}
parent.hack(state);
//-->
</script>
</HEAD>
</html>

Notice the two double-quotes after Tom in the second parent.addpbbsArray line. Either remove one of these or insert a backslash before the first quote. If you want quotes to appear in the name or subject field, you or the site visitor must precede them with a backslash.

After editing, the affected line in bbs-data.html would appear as follows:

parent.addpbbsArray("test 02","861383873600",
"Fri, 18 Apr 1997 17:17:53 GMT",
"Tom",2,"message/1.html","1","1")

After making this change, save the file then reload the BBS. The BBS should now work correctly.

The other file you may want to edit in this example is 1.html. This change, again, is cosmetic, not affecting the functionality of the BBS. Notice that 1.html is the file referenced in the line we edited in bbs-data.html. Here's a portion of this file before editing:

<b>Name</b>: Tom"
<b>Email</b>: <a href=mailto:tom@nowhere.com>tom@nowhere.co m</ a>
<b>Subject</b>:testing 01

You may want to remove the double-quote from <b>Name</b>: Tom". Doing so will eliminate the quote from the Name field in the displayed message.

Double-Quote Entered in Subject Field of New Message
The explanation regarding double quotes in the Name field applies also to quotes in the Subject field. The only difference is where the extra quote appears in the parent.addpbbsArray line. Suppose the site visitor enters a double quote in a message with subject 25" Monitors. In bbs-data.html the parent entry might be as follows:

parent.addpbbsArray("25"Monitors","8613838736 00", . . .

You would probably want to retain the double quote in the message, so you would edit it as follows:

parent.addpbbsArray("25\" Monitors","861383873600", . . .

An alternative to using the backslash would be to remove the quote altogether.

parent.addpbbsArray("25-inch Monitors","861383873600", . . .

 

 

Search
 

 

© 2001 NetObjects, Inc. All rights reserved. Privacy Policy