Commits

Shlomi Fish  committed e030147

Add more tests.

  • Participants
  • Parent commits 1fcfb07

Comments (0)

Files changed (14)

File Tests/valid-html-tidy.t

+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use Test::More tests => 1;
+
+use HTML::Tidy;
+use File::Find::Object::Rule;
+use IO::All;
+
+my $tidy = HTML::Tidy->new({ output_xhtml => 1, });
+# $tidy->ignore( type => TIDY_WARNING, typed => TIDY_INFO );
+
+my $error_count = 0;
+
+for my $fn (File::Find::Object::Rule->file()->name(qr/\.x?html\z/)->in("./dest"))
+{
+    $tidy->parse( $fn, (scalar io->file($fn)->slurp()));
+
+    for my $message ( $tidy->messages ) {
+        $error_count++;
+        diag( $message->as_string);
+    }
+}
+
+# TEST
+is ($error_count, 0, "No errors");

File lib/retrieved-html-parts/Perl_Humour.html

 </p>
 <h2 id="Quotes"> Quotes </h2>
 <ul>
-<li> Larry Wall Quotes 
+<li> Larry Wall Quotes
 <ul>
 <li><a href="http://en.wikiquote.org/wiki/Larry_Wall" title="http://en.wikiquote.org/wiki/Larry_Wall">Larry Wall Quotes on Wikiquote</a></li>
 
 
 
 
-<li> &quot;The Daily WTF&quot; 
+<li> &quot;The Daily WTF&quot;
 <ul>
 
 <li><a href="http://worsethanfailure.com/Articles/Turn_it_up_to_Eleven.aspx" title="http://worsethanfailure.com/Articles/Turn_it_up_to_Eleven.aspx">&quot;Turn it up to Eleven&quot;</a>

File src/tutorials/bad-elements/index.html.wml

     my @row = generate_row($elem);
     push @array_of_rows, \@row;
 }
-</p>
+</pre>
 
 <p>
 Or alternatively:
 {
     push @array_of_rows, [generate_row($elem)];
 }
-</p>
+</pre>
 
 </item>
 

File src/uses/web/ovids_cgi_course/appendix1.html

 	if(val == "inline") {
 		document.getElementById("displayYearEl").style.color = "#ec008c";
 		document.getElementById("displayMonthEl").style.color = "#ec008c";
-		document.getElementById("displayDayEl").style.color = "#ec008c";		
+		document.getElementById("displayDayEl").style.color = "#ec008c";
 	} else {
 		document.getElementById("displayYearEl").innerHTML = displayYear;
 		document.getElementById("displayYearEl").style.color = "#ff0";
 }
 function getElementX2(obj) {
 	var thing = jQuery(obj);
-	if((thing == undefined) 
-			|| (typeof thing == "undefined") 
+	if((thing == undefined)
+			|| (typeof thing == "undefined")
 			|| (typeof thing.offset == "undefined")) {
 		return getElementX(obj);
 	}
 	if(monthOff % 2 == 1) {
 		day = 15;
 	}
-	var dateString = 
-		zeroPad(year + firstYear) + 
+	var dateString =
+		zeroPad(year + firstYear) +
 		zeroPad(monthOfYear+1,2) +
 		zeroPad(day,2) + "000000";
 
        </td>
        <td style="vertical-align:bottom;padding:5px 0 0 0!important;" rowspan="2">
            <table style="border-collapse:collapse;width:110px;color:#99a;font-family:'Helvetica','Lucida Grande','Arial',sans-serif;"><tbody>
-			
+
            <!-- NEXT/PREV MONTH NAV AND MONTH INDICATOR -->
            <tr style="width:110px;height:16px;font-size:10px!important;">
            	<td style="padding-right:9px;font-size:11px!important;font-weight:bold;text-transform:uppercase;text-align:right;white-space:nowrap;overflow:visible;" nowrap="nowrap">
-               
+
                        Oct
-                       
+
                </td>
                <td id="displayMonthEl" style="background:#000;color:#ff0;font-size:11px!important;font-weight:bold;text-transform:uppercase;width:34px;height:15px;padding-top:1px;text-align:center;" title="You are here: 15:05:04 Nov 12, 2009">NOV</td>
 				<td style="padding-left:9px;font-size:11px!important;font-weight:bold;text-transform:uppercase;white-space:nowrap;overflow:visible;" nowrap="nowrap">
-               
+
                        Dec
-                       
+
                </td>
            </tr>
 
            <!-- NEXT/PREV CAPTURE NAV AND DAY OF MONTH INDICATOR -->
            <tr>
                <td style="padding-right:9px;white-space:nowrap;overflow:visible;text-align:right!important;vertical-align:middle!important;" nowrap="nowrap">
-               
+
                        <img src="file:///home/shlomif/OVID_CGI/staticweb.archive.org/images/toolbar/wm_tb_prv_off.png" alt="Previous capture" width="14" height="16" border="0" />
-                       
+
                </td>
                <td id="displayDayEl" style="background:#000;color:#ff0;width:34px;height:24px;padding:2px 0 0 0;text-align:center;font-size:24px;font-weight: bold;" title="You are here: 15:05:04 Nov 12, 2009">12</td>
 				<td style="padding-left:9px;white-space:nowrap;overflow:visible;text-align:left!important;vertical-align:middle!important;" nowrap="nowrap">
-               
+
                        <img src="file:///home/shlomif/OVID_CGI/staticweb.archive.org/images/toolbar/wm_tb_nxt_off.png" alt="Next capture" width="14" height="16" border="0"/>
-                       
+
 			    </td>
            </tr>
 
            <!-- NEXT/PREV YEAR NAV AND YEAR INDICATOR -->
            <tr style="width:110px;height:13px;font-size:9px!important;">
 				<td style="padding-right:9px;font-size:11px!important;font-weight: bold;text-align:right;white-space:nowrap;overflow:visible;" nowrap="nowrap">
-               
+
                        2008
-                       
+
                </td>
                <td id="displayYearEl" style="background:#000;color:#ff0;font-size:11px!important;font-weight: bold;padding-top:1px;width:34px;height:13px;text-align:center;" title="You are here: 15:05:04 Nov 12, 2009">2009</td>
 				<td style="padding-left:9px;font-size:11px!important;font-weight: bold;white-space:nowrap;overflow:visible;" nowrap="nowrap">
-               
+
                        2010
-                       
+
 				</td>
            </tr>
            </tbody></table>
        <a style="position:relative; white-space:nowrap; width:450px;height:27px;" href="" id="wm-graph-anchor">
        <div id="wm-ipp-sparkline" style="position:relative; white-space:nowrap; width:450px;height:27px;background-color:#fff;cursor:pointer;border-right:1px solid #ccc;" title="Explore captures for this URL">
 			<img id="sparklineImgId" style="position:absolute; z-index:9012; top:0px; left:0px;"
-				onmouseover="showTrackers('inline');" 
+				onmouseover="showTrackers('inline');"
 				onmouseout="showTrackers('none');"
 				onmousemove="trackMouseMove(event,this)"
 				alt="sparklines"
 				height="27"
 				border="0"
 				src="file:///home/shlomif/OVID_CGI/wayback.archive.org/web/jsp/graph.jsp"></img>
-			<img id="wbMouseTrackYearImg" 
+			<img id="wbMouseTrackYearImg"
 				style="display:none; position:absolute; z-index:9010;"
-				width="25" 
+				width="25"
 				height="27"
 				border="0"
 				src="file:///home/shlomif/OVID_CGI/staticweb.archive.org/images/toolbar/transp-yellow-pixel.png"></img>
 			<img id="wbMouseTrackMonthImg"
-				style="display:none; position:absolute; z-index:9011; " 
+				style="display:none; position:absolute; z-index:9011; "
 				width="2"
-				height="27" 
+				height="27"
 				border="0"
 				src="file:///home/shlomif/OVID_CGI/staticweb.archive.org/images/toolbar/transp-red-pixel.png"></img>
        </div>
 
 <p>What follows is a sort of checklist to help you solve the
 problem quickly yourself. It is divided into four parts:</p>
-                                                                  
+
 <ol type="a">
 <li><a href="appendix1.html#A">Before uploading to the Server</a></li>
 <li><a href="appendix1.html#B">Uploading to the Server</a></li>
 <h4>Syntax Errors</h4>
 
 <pre>perl -c test.pl
-String found where operator expected at test.pl line 1, 
+String found where operator expected at test.pl line 1,
 near "printt "Hello World!""
 (Do you need to predeclare printt?)
 syntax error at test.pl line 1, near "printt "Hello World!""
 installed.</p>
 
 <pre>perl -c test.pl
-Can't locate Some/Module.pm in @INC (@INC contains: 
+Can't locate Some/Module.pm in @INC (@INC contains:
 C:/Perl/lib C:/Perl/site/lib .) at test.pl line 1.
 BEGIN failed--compilation aborted at test.pl line 1.
 
 <h3>2. Are you using strict and warnings?</h3>
 
 <pre>
-#!/usr/bin/perl <a href="http://perlmonks.org/?node=53947"><tt>-w</tt></a> # "-w" turns on all sorts of warnings about probable errors. 
+#!/usr/bin/perl <a href="http://perlmonks.org/?node=53947"><tt>-w</tt></a> # "-w" turns on all sorts of warnings about probable errors.
 use <a href="http://perlmonks.org/?node=doc://diagnostics"><tt>diagnostics;</tt></a>   # optional; causes warnings to be explained in greater detail.
 use <a href="http://perlmonks.org/?node=doc://strict"><tt>strict;</tt></a>        # generates compile and run-time errors for certain unsafe constructs.
 </pre>
 my $name     = $q-&gt;param('name');
 
 # now get an array of values of all form parameters named 'option'
-my @options  = $q-&gt;param('option');  
+my @options  = $q-&gt;param('option');
 </pre>
 
 <p>As you can see it is very easy to use CGI.pm. Besides this
 </pre>
 
 <p>
-If you're not sure, ask your system administrator about it. 
+If you're not sure, ask your system administrator about it.
 Whatever the correct directory is, that is where you will want to
 upload your scripts into.
 </p>
 script, say via a link like:</p>
 
 <pre>  &lt;a href="http://www.mydomain.com/cgi-bin/myscript.cgi"&gt;Run my script&lt;/a&gt;
- 
+
 </pre>
 
 <p>(ii) The server receives the request and goes "Ah ha! This is a
 need to be installed. If you have followed the advice so far you
 will get the typical:</p>
 
-<pre>Can't locate Some/Module.pm in @INC (@INC contains: 
+<pre>Can't locate Some/Module.pm in @INC (@INC contains:
 C:/Perl/lib C:/Perl/site/lib .) at test.pl line 12.
 </pre>
 
 <li> <a href="http://perlmonks.org/?node=sierrathedog04">sierrathedog04</a> </li>
 <li> <a href="http://perlmonks.org/?node_id=17361">converter</a> </li>
 </ul>
-It is now collaboratively maintained by the 
+It is now collaboratively maintained by the
 <a href="http://perlmonks.org/?node_id=591017">PerlMonks Pedagogues</a>.
 </p>
 
 </p>
 
 <p>
-If you know of any other good tutorials, please go to 
+If you know of any other good tutorials, please go to
 <a href="http://perlmonks.org/">PerlMonks</a> and inform the
 <a href="http://perlmonks.org/?node_id=591017">Pedagogues</a> group
-about it. (They're the ones who maintain the 
+about it. (They're the ones who maintain the
 <a href="http://perlmonks.org/?node=Tutorials">Tutorials</a> hosted
 on that site.)
 </p>

File src/uses/web/ovids_cgi_course/appendix2.html

 	if(val == "inline") {
 		document.getElementById("displayYearEl").style.color = "#ec008c";
 		document.getElementById("displayMonthEl").style.color = "#ec008c";
-		document.getElementById("displayDayEl").style.color = "#ec008c";		
+		document.getElementById("displayDayEl").style.color = "#ec008c";
 	} else {
 		document.getElementById("displayYearEl").innerHTML = displayYear;
 		document.getElementById("displayYearEl").style.color = "#ff0";
 }
 function getElementX2(obj) {
 	var thing = jQuery(obj);
-	if((thing == undefined) 
-			|| (typeof thing == "undefined") 
+	if((thing == undefined)
+			|| (typeof thing == "undefined")
 			|| (typeof thing.offset == "undefined")) {
 		return getElementX(obj);
 	}
 	if(monthOff % 2 == 1) {
 		day = 15;
 	}
-	var dateString = 
-		zeroPad(year + firstYear) + 
+	var dateString =
+		zeroPad(year + firstYear) +
 		zeroPad(monthOfYear+1,2) +
 		zeroPad(day,2) + "000000";
 
        </td>
        <td style="vertical-align:bottom;padding:5px 0 0 0!important;" rowspan="2">
            <table style="border-collapse:collapse;width:110px;color:#99a;font-family:'Helvetica','Lucida Grande','Arial',sans-serif;"><tbody>
-			
+
            <!-- NEXT/PREV MONTH NAV AND MONTH INDICATOR -->
            <tr style="width:110px;height:16px;font-size:10px!important;">
            	<td style="padding-right:9px;font-size:11px!important;font-weight:bold;text-transform:uppercase;text-align:right;white-space:nowrap;overflow:visible;" nowrap="nowrap">
-               
+
                        Oct
-                       
+
                </td>
                <td id="displayMonthEl" style="background:#000;color:#ff0;font-size:11px!important;font-weight:bold;text-transform:uppercase;width:34px;height:15px;padding-top:1px;text-align:center;" title="You are here: 18:31:37 Nov 13, 2009">NOV</td>
 				<td style="padding-left:9px;font-size:11px!important;font-weight:bold;text-transform:uppercase;white-space:nowrap;overflow:visible;" nowrap="nowrap">
-               
+
                        Dec
-                       
+
                </td>
            </tr>
 
            <!-- NEXT/PREV CAPTURE NAV AND DAY OF MONTH INDICATOR -->
            <tr>
                <td style="padding-right:9px;white-space:nowrap;overflow:visible;text-align:right!important;vertical-align:middle!important;" nowrap="nowrap">
-               
+
                        <img src="file:///home/shlomif/OVID_CGI/staticweb.archive.org/images/toolbar/wm_tb_prv_off.png" alt="Previous capture" width="14" height="16" border="0" />
-                       
+
                </td>
                <td id="displayDayEl" style="background:#000;color:#ff0;width:34px;height:24px;padding:2px 0 0 0;text-align:center;font-size:24px;font-weight: bold;" title="You are here: 18:31:37 Nov 13, 2009">13</td>
 				<td style="padding-left:9px;white-space:nowrap;overflow:visible;text-align:left!important;vertical-align:middle!important;" nowrap="nowrap">
-               
+
                        <img src="file:///home/shlomif/OVID_CGI/staticweb.archive.org/images/toolbar/wm_tb_nxt_off.png" alt="Next capture" width="14" height="16" border="0"/>
-                       
+
 			    </td>
            </tr>
 
            <!-- NEXT/PREV YEAR NAV AND YEAR INDICATOR -->
            <tr style="width:110px;height:13px;font-size:9px!important;">
 				<td style="padding-right:9px;font-size:11px!important;font-weight: bold;text-align:right;white-space:nowrap;overflow:visible;" nowrap="nowrap">
-               
+
                        2008
-                       
+
                </td>
                <td id="displayYearEl" style="background:#000;color:#ff0;font-size:11px!important;font-weight: bold;padding-top:1px;width:34px;height:13px;text-align:center;" title="You are here: 18:31:37 Nov 13, 2009">2009</td>
 				<td style="padding-left:9px;font-size:11px!important;font-weight: bold;white-space:nowrap;overflow:visible;" nowrap="nowrap">
-               
+
                        2010
-                       
+
 				</td>
            </tr>
            </tbody></table>
        <a style="position:relative; white-space:nowrap; width:450px;height:27px;" href="" id="wm-graph-anchor">
        <div id="wm-ipp-sparkline" style="position:relative; white-space:nowrap; width:450px;height:27px;background-color:#fff;cursor:pointer;border-right:1px solid #ccc;" title="Explore captures for this URL">
 			<img id="sparklineImgId" style="position:absolute; z-index:9012; top:0px; left:0px;"
-				onmouseover="showTrackers('inline');" 
+				onmouseover="showTrackers('inline');"
 				onmouseout="showTrackers('none');"
 				onmousemove="trackMouseMove(event,this)"
 				alt="sparklines"
 				height="27"
 				border="0"
 				src="file:///home/shlomif/OVID_CGI/wayback.archive.org/web/jsp/graph.jsp"></img>
-			<img id="wbMouseTrackYearImg" 
+			<img id="wbMouseTrackYearImg"
 				style="display:none; position:absolute; z-index:9010;"
-				width="25" 
+				width="25"
 				height="27"
 				border="0"
 				src="file:///home/shlomif/OVID_CGI/staticweb.archive.org/images/toolbar/transp-yellow-pixel.png"></img>
 			<img id="wbMouseTrackMonthImg"
-				style="display:none; position:absolute; z-index:9011; " 
+				style="display:none; position:absolute; z-index:9011; "
 				width="2"
-				height="27" 
+				height="27"
 				border="0"
 				src="file:///home/shlomif/OVID_CGI/staticweb.archive.org/images/toolbar/transp-red-pixel.png"></img>
        </div>

File src/uses/web/ovids_cgi_course/index.html

 	if(val == "inline") {
 		document.getElementById("displayYearEl").style.color = "#ec008c";
 		document.getElementById("displayMonthEl").style.color = "#ec008c";
-		document.getElementById("displayDayEl").style.color = "#ec008c";		
+		document.getElementById("displayDayEl").style.color = "#ec008c";
 	} else {
 		document.getElementById("displayYearEl").innerHTML = displayYear;
 		document.getElementById("displayYearEl").style.color = "#ff0";
 }
 function getElementX2(obj) {
 	var thing = jQuery(obj);
-	if((thing == undefined) 
-			|| (typeof thing == "undefined") 
+	if((thing == undefined)
+			|| (typeof thing == "undefined")
 			|| (typeof thing.offset == "undefined")) {
 		return getElementX(obj);
 	}
 	if(monthOff % 2 == 1) {
 		day = 15;
 	}
-	var dateString = 
-		zeroPad(year + firstYear) + 
+	var dateString =
+		zeroPad(year + firstYear) +
 		zeroPad(monthOfYear+1,2) +
 		zeroPad(day,2) + "000000";
 
        </td>
        <td style="vertical-align:bottom;padding:5px 0 0 0!important;" rowspan="2">
            <table style="border-collapse:collapse;width:110px;color:#99a;font-family:'Helvetica','Lucida Grande','Arial',sans-serif;"><tbody>
-			
+
            <!-- NEXT/PREV MONTH NAV AND MONTH INDICATOR -->
            <tr style="width:110px;height:16px;font-size:10px!important;">
            	<td style="padding-right:9px;font-size:11px!important;font-weight:bold;text-transform:uppercase;text-align:right;white-space:nowrap;overflow:visible;" nowrap="nowrap">
-               
+
                        Jul
-                       
+
                </td>
                <td id="displayMonthEl" style="background:#000;color:#ff0;font-size:11px!important;font-weight:bold;text-transform:uppercase;width:34px;height:15px;padding-top:1px;text-align:center;" title="You are here: 9:19:37 Aug 25, 2010">AUG</td>
 				<td style="padding-left:9px;font-size:11px!important;font-weight:bold;text-transform:uppercase;white-space:nowrap;overflow:visible;" nowrap="nowrap">
-               
+
                        Sep
-                       
+
                </td>
            </tr>
 
            <!-- NEXT/PREV CAPTURE NAV AND DAY OF MONTH INDICATOR -->
            <tr>
                <td style="padding-right:9px;white-space:nowrap;overflow:visible;text-align:right!important;vertical-align:middle!important;" nowrap="nowrap">
-               
+
 		                <a href="" title="4:09:33 Aug 23, 2010" style="background-color:transparent;border:none;"><img src="file:///home/shlomif/OVID_CGI/staticweb.archive.org/images/toolbar/wm_tb_prv_on.png" alt="Previous capture" width="14" height="16" border="0" /></a>
-		                
+
                </td>
                <td id="displayDayEl" style="background:#000;color:#ff0;width:34px;height:24px;padding:2px 0 0 0;text-align:center;font-size:24px;font-weight: bold;" title="You are here: 9:19:37 Aug 25, 2010">25</td>
 				<td style="padding-left:9px;white-space:nowrap;overflow:visible;text-align:left!important;vertical-align:middle!important;" nowrap="nowrap">
-               
+
                        <img src="file:///home/shlomif/OVID_CGI/staticweb.archive.org/images/toolbar/wm_tb_nxt_off.png" alt="Next capture" width="14" height="16" border="0"/>
-                       
+
 			    </td>
            </tr>
 
            <!-- NEXT/PREV YEAR NAV AND YEAR INDICATOR -->
            <tr style="width:110px;height:13px;font-size:9px!important;">
 				<td style="padding-right:9px;font-size:11px!important;font-weight: bold;text-align:right;white-space:nowrap;overflow:visible;" nowrap="nowrap">
-               
+
                        2009
-                       
+
                </td>
                <td id="displayYearEl" style="background:#000;color:#ff0;font-size:11px!important;font-weight: bold;padding-top:1px;width:34px;height:13px;text-align:center;" title="You are here: 9:19:37 Aug 25, 2010">2010</td>
 				<td style="padding-left:9px;font-size:11px!important;font-weight: bold;white-space:nowrap;overflow:visible;" nowrap="nowrap">
-               
+
                        2011
-                       
+
 				</td>
            </tr>
            </tbody></table>
        <a style="position:relative; white-space:nowrap; width:450px;height:27px;" href="" id="wm-graph-anchor">
        <div id="wm-ipp-sparkline" style="position:relative; white-space:nowrap; width:450px;height:27px;background-color:#fff;cursor:pointer;border-right:1px solid #ccc;" title="Explore captures for this URL">
 			<img id="sparklineImgId" style="position:absolute; z-index:9012; top:0px; left:0px;"
-				onmouseover="showTrackers('inline');" 
+				onmouseover="showTrackers('inline');"
 				onmouseout="showTrackers('none');"
 				onmousemove="trackMouseMove(event,this)"
 				alt="sparklines"
 				height="27"
 				border="0"
 				src="file:///home/shlomif/OVID_CGI/wayback.archive.org/web/jsp/graph.jsp"></img>
-			<img id="wbMouseTrackYearImg" 
+			<img id="wbMouseTrackYearImg"
 				style="display:none; position:absolute; z-index:9010;"
-				width="25" 
+				width="25"
 				height="27"
 				border="0"
 				src="file:///home/shlomif/OVID_CGI/staticweb.archive.org/images/toolbar/transp-yellow-pixel.png"></img>
 			<img id="wbMouseTrackMonthImg"
-				style="display:none; position:absolute; z-index:9011; " 
+				style="display:none; position:absolute; z-index:9011; "
 				width="2"
-				height="27" 
+				height="27"
 				border="0"
 				src="file:///home/shlomif/OVID_CGI/staticweb.archive.org/images/toolbar/transp-red-pixel.png"></img>
        </div>
 
 <p>Do you want to learn web programming <em>quickly</em>? Do you know a
 little Perl and a little HTML? Then this course is for you. Learn how to do
-web programming securely while avoiding many of the common pitfalls 
+web programming securely while avoiding many of the common pitfalls
 found in other courses.</p>
 
 <h3>Table of Contents</h3>

File src/uses/web/ovids_cgi_course/intro.html

 	if(val == "inline") {
 		document.getElementById("displayYearEl").style.color = "#ec008c";
 		document.getElementById("displayMonthEl").style.color = "#ec008c";
-		document.getElementById("displayDayEl").style.color = "#ec008c";		
+		document.getElementById("displayDayEl").style.color = "#ec008c";
 	} else {
 		document.getElementById("displayYearEl").innerHTML = displayYear;
 		document.getElementById("displayYearEl").style.color = "#ff0";
 }
 function getElementX2(obj) {
 	var thing = jQuery(obj);
-	if((thing == undefined) 
-			|| (typeof thing == "undefined") 
+	if((thing == undefined)
+			|| (typeof thing == "undefined")
 			|| (typeof thing.offset == "undefined")) {
 		return getElementX(obj);
 	}
 	if(monthOff % 2 == 1) {
 		day = 15;
 	}
-	var dateString = 
-		zeroPad(year + firstYear) + 
+	var dateString =
+		zeroPad(year + firstYear) +
 		zeroPad(monthOfYear+1,2) +
 		zeroPad(day,2) + "000000";
 
        </td>
        <td style="vertical-align:bottom;padding:5px 0 0 0!important;" rowspan="2">
            <table style="border-collapse:collapse;width:110px;color:#99a;font-family:'Helvetica','Lucida Grande','Arial',sans-serif;"><tbody>
-			
+
            <!-- NEXT/PREV MONTH NAV AND MONTH INDICATOR -->
            <tr style="width:110px;height:16px;font-size:10px!important;">
            	<td style="padding-right:9px;font-size:11px!important;font-weight:bold;text-transform:uppercase;text-align:right;white-space:nowrap;overflow:visible;" nowrap="nowrap">
-               
+
                        Jul
-                       
+
                </td>
                <td id="displayMonthEl" style="background:#000;color:#ff0;font-size:11px!important;font-weight:bold;text-transform:uppercase;width:34px;height:15px;padding-top:1px;text-align:center;" title="You are here: 6:58:03 Aug 24, 2010">AUG</td>
 				<td style="padding-left:9px;font-size:11px!important;font-weight:bold;text-transform:uppercase;white-space:nowrap;overflow:visible;" nowrap="nowrap">
-               
+
                        Sep
-                       
+
                </td>
            </tr>
 
            <!-- NEXT/PREV CAPTURE NAV AND DAY OF MONTH INDICATOR -->
            <tr>
                <td style="padding-right:9px;white-space:nowrap;overflow:visible;text-align:right!important;vertical-align:middle!important;" nowrap="nowrap">
-               
+
                        <img src="file:///home/shlomif/OVID_CGI/staticweb.archive.org/images/toolbar/wm_tb_prv_off.png" alt="Previous capture" width="14" height="16" border="0" />
-                       
+
                </td>
                <td id="displayDayEl" style="background:#000;color:#ff0;width:34px;height:24px;padding:2px 0 0 0;text-align:center;font-size:24px;font-weight: bold;" title="You are here: 6:58:03 Aug 24, 2010">24</td>
 				<td style="padding-left:9px;white-space:nowrap;overflow:visible;text-align:left!important;vertical-align:middle!important;" nowrap="nowrap">
-               
+
 		                <a href="intro.html" title="9:07:23 Sep 1, 2010" style="background-color:transparent;border:none;"><img src="file:///home/shlomif/OVID_CGI/staticweb.archive.org/images/toolbar/wm_tb_nxt_on.png" alt="Next capture" width="14" height="16" border="0"/></a>
-		                
+
 			    </td>
            </tr>
 
            <!-- NEXT/PREV YEAR NAV AND YEAR INDICATOR -->
            <tr style="width:110px;height:13px;font-size:9px!important;">
 				<td style="padding-right:9px;font-size:11px!important;font-weight: bold;text-align:right;white-space:nowrap;overflow:visible;" nowrap="nowrap">
-               
+
                        2009
-                       
+
                </td>
                <td id="displayYearEl" style="background:#000;color:#ff0;font-size:11px!important;font-weight: bold;padding-top:1px;width:34px;height:13px;text-align:center;" title="You are here: 6:58:03 Aug 24, 2010">2010</td>
 				<td style="padding-left:9px;font-size:11px!important;font-weight: bold;white-space:nowrap;overflow:visible;" nowrap="nowrap">
-               
+
                        2011
-                       
+
 				</td>
            </tr>
            </tbody></table>
        <a style="position:relative; white-space:nowrap; width:450px;height:27px;" href="" id="wm-graph-anchor">
        <div id="wm-ipp-sparkline" style="position:relative; white-space:nowrap; width:450px;height:27px;background-color:#fff;cursor:pointer;border-right:1px solid #ccc;" title="Explore captures for this URL">
 			<img id="sparklineImgId" style="position:absolute; z-index:9012; top:0px; left:0px;"
-				onmouseover="showTrackers('inline');" 
+				onmouseover="showTrackers('inline');"
 				onmouseout="showTrackers('none');"
 				onmousemove="trackMouseMove(event,this)"
 				alt="sparklines"
 				height="27"
 				border="0"
 				src="file:///home/shlomif/OVID_CGI/wayback.archive.org/web/jsp/graph.jsp"></img>
-			<img id="wbMouseTrackYearImg" 
+			<img id="wbMouseTrackYearImg"
 				style="display:none; position:absolute; z-index:9010;"
-				width="25" 
+				width="25"
 				height="27"
 				border="0"
 				src="file:///home/shlomif/OVID_CGI/staticweb.archive.org/images/toolbar/transp-yellow-pixel.png"></img>
 			<img id="wbMouseTrackMonthImg"
-				style="display:none; position:absolute; z-index:9011; " 
+				style="display:none; position:absolute; z-index:9011; "
 				width="2"
-				height="27" 
+				height="27"
 				border="0"
 				src="file:///home/shlomif/OVID_CGI/staticweb.archive.org/images/toolbar/transp-red-pixel.png"></img>
        </div>
 <h3>Why another online web programming tutorial?</h3>
 
 <p>
-This tutorial is brought to you courtesy of 
+This tutorial is brought to you courtesy of
 <a href="http://perlmonks.org/">PerlMonks</a>,
 an online community of Perl programmers and aficionados.
-It was originally authored by Archbishop 
+It was originally authored by Archbishop
 <a href="http://perlmonks.org/?node_id=17000">Ovid</a>
 as a way of giving back to the community,
 and is now collaboratively maintained.
 asking on <a href="http://perlmonks.org/">PerlMonks</a>.
 In particular, see the FAQ
 <a href="http://perlmonks.org/?node_id=17974">I want to ask a question of the Perl Monks; where do I start?</a>
-Further information is found in 
+Further information is found in
 <a href="http://perlmonks.org/?node_id=519263">Understanding and Using PerlMonks</a>.
 </p><p>
-If you're looking for a deeper, more comprehensive tutorial, we recommend the book 
+If you're looking for a deeper, more comprehensive tutorial, we recommend the book
 <a href="http://oreilly.com/catalog/9781565924192/index.html"><i>CGI Programming with Perl</i>, 2nd Ed.</a>, from O'Reilly.
 </p>
 
 <p class="security">First and foremost, every lesson in this course
 discusses security at least once, because security
 is the single biggest failure of most online CGI courses. You
-will be encountering "Security Checkpoints" throughout this course 
-to help reinforce these concepts. 
+will be encountering "Security Checkpoints" throughout this course
+to help reinforce these concepts.
 Each "Security Checkpoint" paragraph is marked by the icon you see
 to the left of this paragraph.  It signifies that you
 should pay special attention to the content of that paragraph.
 </blockquote>
 
 <p>
-Indeed, it could have been much worse. Remember those huge 
+Indeed, it could have been much worse. Remember those huge
 <a href="http://www.cert.org/homeusers/ddos.html">distributed denial-of-service attacks</a>
 on <a href="http://www.yahoo.com/">Yahoo!</a>
 and other large web sites? The attackers needed to break into other
 
 <p>This course assumes that you already have some basic knowledge of Perl.
 You don't need to be an expert, but you should at least be fairly
-comfortable writing simple programs. 
+comfortable writing simple programs.
 For resources on learning Perl, check out the
 <a href="http://perlmonks.org/?node_id=519264">Getting Started with Perl</a>
 tutorials on PerlMonks.
 <h3>HTML</h3>
 
 <p>You should know basic HTML. There's no point in trying to learn CGI
-without knowing basic HTML. 
+without knowing basic HTML.
 <a href="http://www.webmonkey.com/tutorial/tag/web_basics">Webmonkey's web basics tutorials</a>
 should bring you up to speed fairly quickly.
 </p>
 better learn how to deconstruct a HTTP/1.1 header. You need to
 understand MIME types and what different HTTP request methods are.
 However, the emphasis in this course is on learning
-<strong>fast</strong>, so it will 
+<strong>fast</strong>, so it will
 skip <em>Why It Works</em> (when practical) and will focus on
 <em>How It Works</em>.
 This is how most programmers learn anyway. But make no mistake:

File src/uses/web/ovids_cgi_course/lesson_1.html

 	if(val == "inline") {
 		document.getElementById("displayYearEl").style.color = "#ec008c";
 		document.getElementById("displayMonthEl").style.color = "#ec008c";
-		document.getElementById("displayDayEl").style.color = "#ec008c";		
+		document.getElementById("displayDayEl").style.color = "#ec008c";
 	} else {
 		document.getElementById("displayYearEl").innerHTML = displayYear;
 		document.getElementById("displayYearEl").style.color = "#ff0";
 }
 function getElementX2(obj) {
 	var thing = jQuery(obj);
-	if((thing == undefined) 
-			|| (typeof thing == "undefined") 
+	if((thing == undefined)
+			|| (typeof thing == "undefined")
 			|| (typeof thing.offset == "undefined")) {
 		return getElementX(obj);
 	}
 	if(monthOff % 2 == 1) {
 		day = 15;
 	}
-	var dateString = 
-		zeroPad(year + firstYear) + 
+	var dateString =
+		zeroPad(year + firstYear) +
 		zeroPad(monthOfYear+1,2) +
 		zeroPad(day,2) + "000000";
 
        </td>
        <td style="vertical-align:bottom;padding:5px 0 0 0!important;" rowspan="2">
            <table style="border-collapse:collapse;width:110px;color:#99a;font-family:'Helvetica','Lucida Grande','Arial',sans-serif;"><tbody>
-			
+
            <!-- NEXT/PREV MONTH NAV AND MONTH INDICATOR -->
            <tr style="width:110px;height:16px;font-size:10px!important;">
            	<td style="padding-right:9px;font-size:11px!important;font-weight:bold;text-transform:uppercase;text-align:right;white-space:nowrap;overflow:visible;" nowrap="nowrap">
-               
+
 		                <a href="lesson_1.html" style="text-decoration:none;color:#33f;font-weight:bold;background-color:transparent;border:none;" title="13 Nov 2009"><strong>NOV</strong></a>
-		                
+
                </td>
                <td id="displayMonthEl" style="background:#000;color:#ff0;font-size:11px!important;font-weight:bold;text-transform:uppercase;width:34px;height:15px;padding-top:1px;text-align:center;" title="You are here: 7:55:11 Aug 24, 2010">AUG</td>
 				<td style="padding-left:9px;font-size:11px!important;font-weight:bold;text-transform:uppercase;white-space:nowrap;overflow:visible;" nowrap="nowrap">
-               
+
                        Sep
-                       
+
                </td>
            </tr>
 
            <!-- NEXT/PREV CAPTURE NAV AND DAY OF MONTH INDICATOR -->
            <tr>
                <td style="padding-right:9px;white-space:nowrap;overflow:visible;text-align:right!important;vertical-align:middle!important;" nowrap="nowrap">
-               
+
 		                <a href="lesson_1.html" title="18:31:58 Nov 13, 2009" style="background-color:transparent;border:none;"><img src="file:///home/shlomif/OVID_CGI/staticweb.archive.org/images/toolbar/wm_tb_prv_on.png" alt="Previous capture" width="14" height="16" border="0" /></a>
-		                
+
                </td>
                <td id="displayDayEl" style="background:#000;color:#ff0;width:34px;height:24px;padding:2px 0 0 0;text-align:center;font-size:24px;font-weight: bold;" title="You are here: 7:55:11 Aug 24, 2010">24</td>
 				<td style="padding-left:9px;white-space:nowrap;overflow:visible;text-align:left!important;vertical-align:middle!important;" nowrap="nowrap">
-               
+
                        <img src="file:///home/shlomif/OVID_CGI/staticweb.archive.org/images/toolbar/wm_tb_nxt_off.png" alt="Next capture" width="14" height="16" border="0"/>
-                       
+
 			    </td>
            </tr>
 
            <!-- NEXT/PREV YEAR NAV AND YEAR INDICATOR -->
            <tr style="width:110px;height:13px;font-size:9px!important;">
 				<td style="padding-right:9px;font-size:11px!important;font-weight: bold;text-align:right;white-space:nowrap;overflow:visible;" nowrap="nowrap">
-               
+
                        2009
-                       
+
                </td>
                <td id="displayYearEl" style="background:#000;color:#ff0;font-size:11px!important;font-weight: bold;padding-top:1px;width:34px;height:13px;text-align:center;" title="You are here: 7:55:11 Aug 24, 2010">2010</td>
 				<td style="padding-left:9px;font-size:11px!important;font-weight: bold;white-space:nowrap;overflow:visible;" nowrap="nowrap">
-               
+
                        2011
-                       
+
 				</td>
            </tr>
            </tbody></table>
        <a style="position:relative; white-space:nowrap; width:450px;height:27px;" href="" id="wm-graph-anchor">
        <div id="wm-ipp-sparkline" style="position:relative; white-space:nowrap; width:450px;height:27px;background-color:#fff;cursor:pointer;border-right:1px solid #ccc;" title="Explore captures for this URL">
 			<img id="sparklineImgId" style="position:absolute; z-index:9012; top:0px; left:0px;"
-				onmouseover="showTrackers('inline');" 
+				onmouseover="showTrackers('inline');"
 				onmouseout="showTrackers('none');"
 				onmousemove="trackMouseMove(event,this)"
 				alt="sparklines"
 				height="27"
 				border="0"
 				src="file:///home/shlomif/OVID_CGI/wayback.archive.org/web/jsp/graph.jsp"></img>
-			<img id="wbMouseTrackYearImg" 
+			<img id="wbMouseTrackYearImg"
 				style="display:none; position:absolute; z-index:9010;"
-				width="25" 
+				width="25"
 				height="27"
 				border="0"
 				src="file:///home/shlomif/OVID_CGI/staticweb.archive.org/images/toolbar/transp-yellow-pixel.png"></img>
 			<img id="wbMouseTrackMonthImg"
-				style="display:none; position:absolute; z-index:9011; " 
+				style="display:none; position:absolute; z-index:9011; "
 				width="2"
-				height="27" 
+				height="27"
 				border="0"
 				src="file:///home/shlomif/OVID_CGI/staticweb.archive.org/images/toolbar/transp-red-pixel.png"></img>
        </div>
 
 <p><img src="file:///home/shlomif/OVID_CGI/web.archive.org/web/20100824075511im_/http:/jdporter.perlmonk.org/cgi_course/lesson_one_a.jpg" alt="Output of first CGI program" border="0" width="471" height="185">
 </p>
- 
+
 <p>Actually, there's nothing <em>really</em> wrong with this program, but
 it's bad programming style. Throughout this course, we'll concentrate
 on doing things the <strong>right</strong> way. This means that we'll
 mistyped a variable name), attempts to write to a read-only file handle, using
 arrays as scalars and many other things. This switch will save you many hours
 of debugging and should be used on all Perl programs, not just CGI
-programs.</p> 
+programs.</p>
 
 <p class="security"><img src="file:///home/shlomif/OVID_CGI/web.archive.org/web/20100824075511im_/http:/jdporter.perlmonk.org/cgi_course/checkpoint.gif" alt="Security Checkpoint" align="left" border="0" width="26" height="28">
 The <tt>-T</tt> switch may be new to you. This switch enables what is known as
 
 <ol>
   <li><tt>use strict 'vars';</tt>
-  
+
   <p>You must predeclare a variable, fully qualify it (e.g.: $package::foo), or
   import it. In practice, you'll find predeclaring variables to be your
   most significant issue.</p></li>
 
   <li><tt>use strict 'subs';</tt>
-  
+
   <p>This prohibits you from using barewords to call a subroutine, unless the
   subroutine has already been declared (e.g., using "somesub" instead
   of "&amp;somesub" or "somesub()"). Personally, I find the
   discuss these as appropriate.</p></li>
 
   <li><tt>use strict 'refs';</tt>
-  
+
   <p>This pragma prohibits you from using symbolic references. If you already
   know what this means, I apologize for having you wade through all of this
   <tt>strict</tt> stuff. If you don't know what this means, suffice it to
 <h4><tt>$query-&gt;start_html(-title =&gt; "My First CGI Script" ... $query-&gt;end_html;</tt></h4>
 
 <p>Yup, we're just slurping up all of the rest of that as we'll go into
-using CGI.pm more in the next lesson. For now, just trust us, it works. 
+using CGI.pm more in the next lesson. For now, just trust us, it works.
 What follows is an alternate method of generating that web page
 using a what is known as a 'here' document.</p>
 
 
 <ol>
   <li>
-    What's wrong with the following script? 
+    What's wrong with the following script?
 
 <div class="program"><pre>#!/usr/bin/perl -wT
 use strict;

File src/uses/web/ovids_cgi_course/lesson_2.html

 	if(val == "inline") {
 		document.getElementById("displayYearEl").style.color = "#ec008c";
 		document.getElementById("displayMonthEl").style.color = "#ec008c";
-		document.getElementById("displayDayEl").style.color = "#ec008c";		
+		document.getElementById("displayDayEl").style.color = "#ec008c";
 	} else {
 		document.getElementById("displayYearEl").innerHTML = displayYear;
 		document.getElementById("displayYearEl").style.color = "#ff0";
 }
 function getElementX2(obj) {
 	var thing = jQuery(obj);
-	if((thing == undefined) 
-			|| (typeof thing == "undefined") 
+	if((thing == undefined)
+			|| (typeof thing == "undefined")
 			|| (typeof thing.offset == "undefined")) {
 		return getElementX(obj);
 	}
 	if(monthOff % 2 == 1) {
 		day = 15;
 	}
-	var dateString = 
-		zeroPad(year + firstYear) + 
+	var dateString =
+		zeroPad(year + firstYear) +
 		zeroPad(monthOfYear+1,2) +
 		zeroPad(day,2) + "000000";
 
        </td>
        <td style="vertical-align:bottom;padding:5px 0 0 0!important;" rowspan="2">
            <table style="border-collapse:collapse;width:110px;color:#99a;font-family:'Helvetica','Lucida Grande','Arial',sans-serif;"><tbody>
-			
+
            <!-- NEXT/PREV MONTH NAV AND MONTH INDICATOR -->
            <tr style="width:110px;height:16px;font-size:10px!important;">
            	<td style="padding-right:9px;font-size:11px!important;font-weight:bold;text-transform:uppercase;text-align:right;white-space:nowrap;overflow:visible;" nowrap="nowrap">
-               
+
                        Apr
-                       
+
                </td>
                <td id="displayMonthEl" style="background:#000;color:#ff0;font-size:11px!important;font-weight:bold;text-transform:uppercase;width:34px;height:15px;padding-top:1px;text-align:center;" title="You are here: 5:26:43 May 31, 2010">MAY</td>
 				<td style="padding-left:9px;font-size:11px!important;font-weight:bold;text-transform:uppercase;white-space:nowrap;overflow:visible;" nowrap="nowrap">
-               
+
                        Jun
-                       
+
                </td>
            </tr>
 
            <!-- NEXT/PREV CAPTURE NAV AND DAY OF MONTH INDICATOR -->
            <tr>
                <td style="padding-right:9px;white-space:nowrap;overflow:visible;text-align:right!important;vertical-align:middle!important;" nowrap="nowrap">
-               
+
                        <img src="file:///home/shlomif/OVID_CGI/staticweb.archive.org/images/toolbar/wm_tb_prv_off.png" alt="Previous capture" width="14" height="16" border="0" />
-                       
+
                </td>
                <td id="displayDayEl" style="background:#000;color:#ff0;width:34px;height:24px;padding:2px 0 0 0;text-align:center;font-size:24px;font-weight: bold;" title="You are here: 5:26:43 May 31, 2010">31</td>
 				<td style="padding-left:9px;white-space:nowrap;overflow:visible;text-align:left!important;vertical-align:middle!important;" nowrap="nowrap">
-               
+
                        <img src="file:///home/shlomif/OVID_CGI/staticweb.archive.org/images/toolbar/wm_tb_nxt_off.png" alt="Next capture" width="14" height="16" border="0"/>
-                       
+
 			    </td>
            </tr>
 
            <!-- NEXT/PREV YEAR NAV AND YEAR INDICATOR -->
            <tr style="width:110px;height:13px;font-size:9px!important;">
 				<td style="padding-right:9px;font-size:11px!important;font-weight: bold;text-align:right;white-space:nowrap;overflow:visible;" nowrap="nowrap">
-               
+
                        2009
-                       
+
                </td>
                <td id="displayYearEl" style="background:#000;color:#ff0;font-size:11px!important;font-weight: bold;padding-top:1px;width:34px;height:13px;text-align:center;" title="You are here: 5:26:43 May 31, 2010">2010</td>
 				<td style="padding-left:9px;font-size:11px!important;font-weight: bold;white-space:nowrap;overflow:visible;" nowrap="nowrap">
-               
+
                        2011
-                       
+
 				</td>
            </tr>
            </tbody></table>
        <a style="position:relative; white-space:nowrap; width:450px;height:27px;" href="" id="wm-graph-anchor">
        <div id="wm-ipp-sparkline" style="position:relative; white-space:nowrap; width:450px;height:27px;background-color:#fff;cursor:pointer;border-right:1px solid #ccc;" title="Explore captures for this URL">
 			<img id="sparklineImgId" style="position:absolute; z-index:9012; top:0px; left:0px;"
-				onmouseover="showTrackers('inline');" 
+				onmouseover="showTrackers('inline');"
 				onmouseout="showTrackers('none');"
 				onmousemove="trackMouseMove(event,this)"
 				alt="sparklines"
 				height="27"
 				border="0"
 				src="file:///home/shlomif/OVID_CGI/wayback.archive.org/web/jsp/graph.jsp"></img>
-			<img id="wbMouseTrackYearImg" 
+			<img id="wbMouseTrackYearImg"
 				style="display:none; position:absolute; z-index:9010;"
-				width="25" 
+				width="25"
 				height="27"
 				border="0"
 				src="file:///home/shlomif/OVID_CGI/staticweb.archive.org/images/toolbar/transp-yellow-pixel.png"></img>
 			<img id="wbMouseTrackMonthImg"
-				style="display:none; position:absolute; z-index:9011; " 
+				style="display:none; position:absolute; z-index:9011; "
 				width="2"
-				height="27" 
+				height="27"
 				border="0"
 				src="file:///home/shlomif/OVID_CGI/staticweb.archive.org/images/toolbar/transp-red-pixel.png"></img>
        </div>
 <p>
 Here is a little "behind the scenes" information you
 need in order to understand the following discussion.
-It is somewhat oversimplified, 
+It is somewhat oversimplified,
 but you will have what you need to know for basic CGI
 programming. If you'd like to learn more, see
 the World Wide Web Consortium's
 like this.</p>
 
 <p class="security"><img src="file:///home/shlomif/OVID_CGI/web.archive.org/web/20100531052643im_/http:/jdporter.perlmonk.org/cgi_course/checkpoint.gif" alt="Security Checkpoint" align="left" border="0" width="26" height="28">
-This lesson was inspired, in part by a 
+This lesson was inspired, in part by a
 <a href="http://perlmonks.org/?node_id=36121">security hole</a>
 found in someone's script which would allow anyone else to execute any
 program on that web server (as long as the CGI script had rights to execute it).

File src/uses/web/ovids_cgi_course/lesson_3.html

 	if(val == "inline") {
 		document.getElementById("displayYearEl").style.color = "#ec008c";
 		document.getElementById("displayMonthEl").style.color = "#ec008c";
-		document.getElementById("displayDayEl").style.color = "#ec008c";		
+		document.getElementById("displayDayEl").style.color = "#ec008c";
 	} else {
 		document.getElementById("displayYearEl").innerHTML = displayYear;
 		document.getElementById("displayYearEl").style.color = "#ff0";
 }
 function getElementX2(obj) {
 	var thing = jQuery(obj);
-	if((thing == undefined) 
-			|| (typeof thing == "undefined") 
+	if((thing == undefined)
+			|| (typeof thing == "undefined")
 			|| (typeof thing.offset == "undefined")) {
 		return getElementX(obj);
 	}
 	if(monthOff % 2 == 1) {
 		day = 15;
 	}
-	var dateString = 
-		zeroPad(year + firstYear) + 
+	var dateString =
+		zeroPad(year + firstYear) +
 		zeroPad(monthOfYear+1,2) +
 		zeroPad(day,2) + "000000";
 
        </td>
        <td style="vertical-align:bottom;padding:5px 0 0 0!important;" rowspan="2">
            <table style="border-collapse:collapse;width:110px;color:#99a;font-family:'Helvetica','Lucida Grande','Arial',sans-serif;"><tbody>
-			
+
            <!-- NEXT/PREV MONTH NAV AND MONTH INDICATOR -->
            <tr style="width:110px;height:16px;font-size:10px!important;">
            	<td style="padding-right:9px;font-size:11px!important;font-weight:bold;text-transform:uppercase;text-align:right;white-space:nowrap;overflow:visible;" nowrap="nowrap">
-               
+
                        Jan
-                       
+
                </td>
                <td id="displayMonthEl" style="background:#000;color:#ff0;font-size:11px!important;font-weight:bold;text-transform:uppercase;width:34px;height:15px;padding-top:1px;text-align:center;" title="You are here: 4:23:19 Feb 9, 2010">FEB</td>
 				<td style="padding-left:9px;font-size:11px!important;font-weight:bold;text-transform:uppercase;white-space:nowrap;overflow:visible;" nowrap="nowrap">
-               
+
                        Mar
-                       
+
                </td>
            </tr>
 
            <!-- NEXT/PREV CAPTURE NAV AND DAY OF MONTH INDICATOR -->
            <tr>
                <td style="padding-right:9px;white-space:nowrap;overflow:visible;text-align:right!important;vertical-align:middle!important;" nowrap="nowrap">
-               
+
                        <img src="file:///home/shlomif/OVID_CGI/staticweb.archive.org/images/toolbar/wm_tb_prv_off.png" alt="Previous capture" width="14" height="16" border="0" />
-                       
+
                </td>
                <td id="displayDayEl" style="background:#000;color:#ff0;width:34px;height:24px;padding:2px 0 0 0;text-align:center;font-size:24px;font-weight: bold;" title="You are here: 4:23:19 Feb 9, 2010">9</td>
 				<td style="padding-left:9px;white-space:nowrap;overflow:visible;text-align:left!important;vertical-align:middle!important;" nowrap="nowrap">
-               
+
                        <img src="file:///home/shlomif/OVID_CGI/staticweb.archive.org/images/toolbar/wm_tb_nxt_off.png" alt="Next capture" width="14" height="16" border="0"/>
-                       
+
 			    </td>
            </tr>
 
            <!-- NEXT/PREV YEAR NAV AND YEAR INDICATOR -->
            <tr style="width:110px;height:13px;font-size:9px!important;">
 				<td style="padding-right:9px;font-size:11px!important;font-weight: bold;text-align:right;white-space:nowrap;overflow:visible;" nowrap="nowrap">
-               
+
                        2009
-                       
+
                </td>
                <td id="displayYearEl" style="background:#000;color:#ff0;font-size:11px!important;font-weight: bold;padding-top:1px;width:34px;height:13px;text-align:center;" title="You are here: 4:23:19 Feb 9, 2010">2010</td>
 				<td style="padding-left:9px;font-size:11px!important;font-weight: bold;white-space:nowrap;overflow:visible;" nowrap="nowrap">
-               
+
                        2011
-                       
+
 				</td>
            </tr>
            </tbody></table>
        <a style="position:relative; white-space:nowrap; width:450px;height:27px;" href="" id="wm-graph-anchor">
        <div id="wm-ipp-sparkline" style="position:relative; white-space:nowrap; width:450px;height:27px;background-color:#fff;cursor:pointer;border-right:1px solid #ccc;" title="Explore captures for this URL">
 			<img id="sparklineImgId" style="position:absolute; z-index:9012; top:0px; left:0px;"
-				onmouseover="showTrackers('inline');" 
+				onmouseover="showTrackers('inline');"
 				onmouseout="showTrackers('none');"
 				onmousemove="trackMouseMove(event,this)"
 				alt="sparklines"
 				height="27"
 				border="0"
 				src="file:///home/shlomif/OVID_CGI/wayback.archive.org/web/jsp/graph.jsp"></img>
-			<img id="wbMouseTrackYearImg" 
+			<img id="wbMouseTrackYearImg"
 				style="display:none; position:absolute; z-index:9010;"
-				width="25" 
+				width="25"
 				height="27"
 				border="0"
 				src="file:///home/shlomif/OVID_CGI/staticweb.archive.org/images/toolbar/transp-yellow-pixel.png"></img>
 			<img id="wbMouseTrackMonthImg"
-				style="display:none; position:absolute; z-index:9011; " 
+				style="display:none; position:absolute; z-index:9011; "
 				width="2"
-				height="27" 
+				height="27"
 				border="0"
 				src="file:///home/shlomif/OVID_CGI/staticweb.archive.org/images/toolbar/transp-red-pixel.png"></img>
        </div>
 
 <p class="notice">Note about terminology: In the following, we use the term
 <a href="http://en.wikipedia.org/wiki/Hacker_(computer_security)#Black_hat">cracker</a>
-to refer to the bad guys who try to break (into) your system. 
+to refer to the bad guys who try to break (into) your system.
 This kind of person is often called a
 <a href="http://en.wikipedia.org/wiki/Hacker_(computing)">hacker</a>,
 particularly in the popular press.
 
 <ul>
   <li>
-    <strong>The person who administers the box the web server runs on is a genius and a security guru.</strong> 
+    <strong>The person who administers the box the web server runs on is a genius and a security guru.</strong>
     <p><strong>Reality:</strong> Ok... What if that person is fired?
 Quits? Dies? What if your company decides to switch from Apache to IIS and your
 security guru doesn't know squat about IIS? What if a junior admin changes
 
   </li>
   <li>
-    <strong>No one can get the source code to my script.</strong> 
+    <strong>No one can get the source code to my script.</strong>
     <p><strong>Reality:</strong> Sure, and that disgruntled employee
 down the hall is upset at being passed over for promotion. (Incidentally, the
 majority of corporate espionage incidents are inside jobs, committed by the
 below) which is particularly insidious.</p> </li>
 
   <li>
-    <strong>My script is password protected.</strong> 
+    <strong>My script is password protected.</strong>
     <p><strong>Reality:</strong> Sigh.</p>
     <p>Password protection is the area of the one of the most common security weaknesses.
 Let's say you have a password field in your HTML. If it's not on a secure server, the
 allows anyone to view the contents of a .htaccess file simply by entering a URL
 similar to the following:</p>
 
-    <tt>http://somedomain.com/cgi-bin/path/to/script/.htaccess</tt> 
+    <tt>http://somedomain.com/cgi-bin/path/to/script/.htaccess</tt>
 
     <p>Further, many users choose easily guessable passwords or can be
 tricked into revealing their password.
 </p>
   </li>
   <li>
-    <strong>I only send sensitive data through hidden fields.</strong> 
+    <strong>I only send sensitive data through hidden fields.</strong>
     <p><strong>Reality:</strong>This attempt at security is so weak as to be
 no security at all, yet it seems to be a perennial favorite of people who
 don't know any better.
 of the key.</p>
   </li>
   <li>
-    <strong>The data I'm sending is more secure because I use POST instead of GET.</strong> 
+    <strong>The data I'm sending is more secure because I use POST instead of GET.</strong>
     <p><strong>Reality:</strong> No, it's not. The only advantage
 to using a POST is that the POST data is not recorded in the web server logs,
 but GET data is. Both GET and POST are equally vulnerable to sniffing.</p>
 
 <p>If you have rights to modify CGI.pm, there are a couple of quick changes to
 make to the module which will help avoid denial of service (DoS) attacks.  Open
-the source code and look for lines like the following:</p> 
+the source code and look for lines like the following:</p>
 
 <div class="program"><pre># Set this to a positive value to limit the size of a
 POSTing # to a certain number of bytes: $POST_MAX = -1;
 I once was testing my company's web site. In one field I
 entered data similar to the following: "Tom's Toys".  Seems
 innocuous enough, but I crashed the CGI script which was running that page. It
-turned out that the script was using the data inside a generated 
-SQL statement; in SQL, apostrophe in "Tom's" 
+turned out that the script was using the data inside a generated
+SQL statement; in SQL, apostrophe in "Tom's"
 looked like the end of a field value. The SQL interpreter thought
 that "s Toys" was the continuation of the SQL, but recognized it as
 invalid. Further examination revealed that I could append my own SQL after any
 <blockquote> <em>Robbers will ignore my house because the front door is closed
 and they don't know it's not locked.</em> </blockquote>
 
-<p>Does that sound really stupid? Good. 
+<p>Does that sound really stupid? Good.
 Do everything you can to make security as tight as possible.
 Do due diligence.
 In the <i>post mortem</i> analysis of a security incident, you don't want
 <div class="program"><pre>1.  #!/usr/bin/perl -wT
 2.  use strict;
 3.  use CGI;
-4.  
+4.
 5.  # Do not run this script on a server connected to the 'Net
 6.  # It is supplied as a bad example
 7.
 15.
 16. $data .= '.dat';
 17. my $userInfo;
-18. 
+18.
 19. open FILE, "&lt;$data" or die "Cannot open $data: $!\n";
 20. {
 21.     local $/;
 and if so, open it. Yes, that's jumping through a lot of hoops to avoid
 letting user data near the shell. It's probably overkill in this case.
 But honestly, would you have known about the null byte problem?
-Now you do. 
+Now you do.
 </p>
 
 <p>You may encounter circumstances when you are unavoidably forced to pass user
-data to the shell. We'll cover these as needed. You are strongly advised 
+data to the shell. We'll cover these as needed. You are strongly advised
 to read through the
 <a href="http://www.w3.org/Security/Faq/www-security-faq.html">WWW Security FAQ</a>
 to ensure that you understand the issues involved with this.</p>
 are never tainted.  The data they contain are tainted.  Consider the following
 code:</p>
 
-<div class="program"><pre>#!/usr/bin/perl -wT 
-use strict; 
+<div class="program"><pre>#!/usr/bin/perl -wT
+use strict;
 use CGI qw/:standard/;
 
 my @files = qw/ revenue.csv gambling.txt cheat_the_irs.doc /;
 
 <ol>
   <li>
-    Here's an easy one to start with. What's wrong with the following snippet of HTML: 
+    Here's an easy one to start with. What's wrong with the following snippet of HTML:
 
     <p><tt>&lt;input type="hidden" password="BOB"&gt;</tt></p>
   </li>
 
   <li>
-    Why would you use the following line in a CGI script: 
+    Why would you use the following line in a CGI script:
 
     <div class="program"><pre>$CGI::DISABLE_UPLOADS = 1;</pre></div>
   </li>
   <li>
-    Is the following safe or not? Please explain: 
+    Is the following safe or not? Please explain:
 
 <div class="program"><pre>my $user     = $query-&gt;param( 'username' );
 my $safeUser = $1 if $user =~ /(.+)$/;</pre></div>
   </li>
 
   <li>
-    How would you fix the following code: 
+    How would you fix the following code:
 
 <div class="program"><pre>my $unsafeName = $q-&gt;param( 'filename' );
 $unsafeName    =~ /(\w+\.\w+)$/;

File src/uses/web/ovids_cgi_course/lesson_4.html

 	if(val == "inline") {
 		document.getElementById("displayYearEl").style.color = "#ec008c";
 		document.getElementById("displayMonthEl").style.color = "#ec008c";
-		document.getElementById("displayDayEl").style.color = "#ec008c";		
+		document.getElementById("displayDayEl").style.color = "#ec008c";
 	} else {
 		document.getElementById("displayYearEl").innerHTML = displayYear;
 		document.getElementById("displayYearEl").style.color = "#ff0";
 }
 function getElementX2(obj) {
 	var thing = jQuery(obj);
-	if((thing == undefined) 
-			|| (typeof thing == "undefined") 
+	if((thing == undefined)
+			|| (typeof thing == "undefined")
 			|| (typeof thing.offset == "undefined")) {
 		return getElementX(obj);
 	}
 	if(monthOff % 2 == 1) {
 		day = 15;
 	}
-	var dateString = 
-		zeroPad(year + firstYear) + 
+	var dateString =
+		zeroPad(year + firstYear) +
 		zeroPad(monthOfYear+1,2) +
 		zeroPad(day,2) + "000000";
 
        </td>
        <td style="vertical-align:bottom;padding:5px 0 0 0!important;" rowspan="2">
            <table style="border-collapse:collapse;width:110px;color:#99a;font-family:'Helvetica','Lucida Grande','Arial',sans-serif;"><tbody>
-			
+
            <!-- NEXT/PREV MONTH NAV AND MONTH INDICATOR -->
            <tr style="width:110px;height:16px;font-size:10px!important;">
            	<td style="padding-right:9px;font-size:11px!important;font-weight:bold;text-transform:uppercase;text-align:right;white-space:nowrap;overflow:visible;" nowrap="nowrap">
-               
+
                        Jul
-                       
+
                </td>
                <td id="displayMonthEl" style="background:#000;color:#ff0;font-size:11px!important;font-weight:bold;text-transform:uppercase;width:34px;height:15px;padding-top:1px;text-align:center;" title="You are here: 4:12:21 Aug 23, 2010">AUG</td>
 				<td style="padding-left:9px;font-size:11px!important;font-weight:bold;text-transform:uppercase;white-space:nowrap;overflow:visible;" nowrap="nowrap">
-               
+
                        Sep
-                       
+
                </td>
            </tr>
 
            <!-- NEXT/PREV CAPTURE NAV AND DAY OF MONTH INDICATOR -->
            <tr>
                <td style="padding-right:9px;white-space:nowrap;overflow:visible;text-align:right!important;vertical-align:middle!important;" nowrap="nowrap">
-               
+
                        <img src="file:///home/shlomif/OVID_CGI/staticweb.archive.org/images/toolbar/wm_tb_prv_off.png" alt="Previous capture" width="14" height="16" border="0" />
-                       
+
                </td>
                <td id="displayDayEl" style="background:#000;color:#ff0;width:34px;height:24px;padding:2px 0 0 0;text-align:center;font-size:24px;font-weight: bold;" title="You are here: 4:12:21 Aug 23, 2010">23</td>
 				<td style="padding-left:9px;white-space:nowrap;overflow:visible;text-align:left!important;vertical-align:middle!important;" nowrap="nowrap">
-               
+
                        <img src="file:///home/shlomif/OVID_CGI/staticweb.archive.org/images/toolbar/wm_tb_nxt_off.png" alt="Next capture" width="14" height="16" border="0"/>
-                       
+
 			    </td>
            </tr>
 
            <!-- NEXT/PREV YEAR NAV AND YEAR INDICATOR -->
            <tr style="width:110px;height:13px;font-size:9px!important;">
 				<td style="padding-right:9px;font-size:11px!important;font-weight: bold;text-align:right;white-space:nowrap;overflow:visible;" nowrap="nowrap">
-               
+
                        2009
-                       
+
                </td>
                <td id="displayYearEl" style="background:#000;color:#ff0;font-size:11px!important;font-weight: bold;padding-top:1px;width:34px;height:13px;text-align:center;" title="You are here: 4:12:21 Aug 23, 2010">2010</td>
 				<td style="padding-left:9px;font-size:11px!important;font-weight: bold;white-space:nowrap;overflow:visible;" nowrap="nowrap">
-               
+
                        2011
-                       
+
 				</td>
            </tr>
            </tbody></table>
        <a style="position:relative; white-space:nowrap; width:450px;height:27px;" href="" id="wm-graph-anchor">
        <div id="wm-ipp-sparkline" style="position:relative; white-space:nowrap; width:450px;height:27px;background-color:#fff;cursor:pointer;border-right:1px solid #ccc;" title="Explore captures for this URL">
 			<img id="sparklineImgId" style="position:absolute; z-index:9012; top:0px; left:0px;"
-				onmouseover="showTrackers('inline');" 
+				onmouseover="showTrackers('inline');"
 				onmouseout="showTrackers('none');"
 				onmousemove="trackMouseMove(event,this)"
 				alt="sparklines"
 				height="27"
 				border="0"
 				src="file:///home/shlomif/OVID_CGI/wayback.archive.org/web/jsp/graph.jsp"></img>
-			<img id="wbMouseTrackYearImg" 
+			<img id="wbMouseTrackYearImg"
 				style="display:none; position:absolute; z-index:9010;"
-				width="25" 
+				width="25"
 				height="27"
 				border="0"
 				src="file:///home/shlomif/OVID_CGI/staticweb.archive.org/images/toolbar/transp-yellow-pixel.png"></img>
 			<img id="wbMouseTrackMonthImg"
-				style="display:none; position:absolute; z-index:9011; " 
+				style="display:none; position:absolute; z-index:9011; "
 				width="2"
-				height="27" 
+				height="27"
 				border="0"
 				src="file:///home/shlomif/OVID_CGI/staticweb.archive.org/images/toolbar/transp-red-pixel.png"></img>
        </div>
     &lt;title&gt;Log in to Weird Sports&lt;/title&gt;
   &lt;/head&gt;
   &lt;body style="background-color: #ffffff;"&gt;
-    &lt;div style="color:#000000; 
-         font-family: Tahoma, helvetica, arial;" 
+    &lt;div style="color:#000000;
+         font-family: Tahoma, helvetica, arial;"
          align="center"&gt;
       &lt;h1&gt;Log in to your account&lt;/h1&gt;
       &lt;p&gt;Here you can log in to the Weird Sports mailing list
       just an example from a
       &lt;a href="index.html"&gt;stupid
       CGI programming course&lt;/a&gt;.&lt;/p&gt;
-      &lt;form action="login.cgi" 
-            method="post" 
+      &lt;form action="login.cgi"
+            method="post"
             enctype="application/x-www-form-urlencoded"&gt;
-        &lt;table cellspacing="1" 
-               border="0" 
-               cellpadding="2" 
-               bgcolor="#000000" 
-               style="font: 
+        &lt;table cellspacing="1"
+               border="0"
+               cellpadding="2"
+               bgcolor="#000000"
+               style="font:
                10pt;"&gt;
           &lt;tr style="background-color:#CCCCCC"&gt;
             &lt;td&gt;&lt;strong&gt;User Name:&lt;/strong&gt;&lt;/td&gt;
-            &lt;td&gt;&lt;input type="text" 
-                       size="30" 
-                       maxlength="30" 
+            &lt;td&gt;&lt;input type="text"
+                       size="30"
+                       maxlength="30"
                        name="username"&gt;&lt;/td&gt;
           &lt;/tr&gt;
           &lt;tr style="background-color:#CCCCCC"&gt;
             &lt;td&gt;&lt;strong&gt;Password:&lt;/strong&gt;&lt;/td&gt;
-            &lt;td&gt;&lt;input type="password" 
-                       size="30" 
-                       maxlength="30" 
+            &lt;td&gt;&lt;input type="password"
+                       size="30"
+                       maxlength="30"
                        name="password"&gt;&lt;/td&gt;
           &lt;/tr&gt;
           &lt;tr&gt;
-            &lt;td colspan="2" 
+            &lt;td colspan="2"
                 style="background-color:#CCCCCC"&gt;
-              &lt;input type="checkbox" 
+              &lt;input type="checkbox"
                      name="remember"&gt; Remember my ID on this computer.
             &lt;/td&gt;
           &lt;/tr&gt;
         &lt;/table&gt;
-        &lt;p&gt;&lt;input type="submit" 
-                  value="Login"&gt; &lt;input 
+        &lt;p&gt;&lt;input type="submit"
+                  value="Login"&gt; &lt;input
                   type="reset"&gt;&lt;/p&gt;
       &lt;/form&gt;
     &lt;/div&gt;
 you may not be familiar. First, let's take a close look at the
 <tt>&lt;form&gt;</tt> tag:</p>
 
-<div class="program"><pre>&lt;form action="login.cgi" 
-      method="post" 
+<div class="program"><pre>&lt;form action="login.cgi"
+      method="post"
       enctype="application/x-www-form-urlencoded"&gt;</pre></div>
 
 <p>The form tag tells the browser that this is the start of a form which will
 preceeded by a dash:</p>
 
 <div class="program"><pre>print input({
-    -type      =&gt; "text",  
-    -size      =&gt; "30", 
-    -maxlength =&gt; "30", 
+    -type      =&gt; "text",
+    -size      =&gt; "30",
+    -maxlength =&gt; "30",
     -name      =&gt; "username"
 });</pre></div>
 
 to CGI.pm.  If you are using the object oriented interface and have a reference
 to a CGI object in <tt>$cgi</tt>, the above code becomes:</p>
 
-<div class="program"><pre>print $cgi-&gt;input({ 
-    -type      =&gt; "text",  
-    -size      =&gt; "30", 
-    -maxlength =&gt; "30", 
-    -name      =&gt; "username" 
+<div class="program"><pre>print $cgi-&gt;input({
+    -type      =&gt; "text",
+    -size      =&gt; "30",
+    -maxlength =&gt; "30",
+    -name      =&gt; "username"
 });</pre></div>
 
 <p>For clarity in this lesson, we'll stick with the function oriented

File src/uses/web/ovids_cgi_course/lesson_5.html

 	if(val == "inline") {
 		document.getElementById("displayYearEl").style.color = "#ec008c";
 		document.getElementById("displayMonthEl").style.color = "#ec008c";
-		document.getElementById("displayDayEl").style.color = "#ec008c";		
+		document.getElementById("displayDayEl").style.color = "#ec008c";
 	} else {
 		document.getElementById("displayYearEl").innerHTML = displayYear;
 		document.getElementById("displayYearEl").style.color = "#ff0";
 }
 function getElementX2(obj) {
 	var thing = jQuery(obj);
-	if((thing == undefined) 
-			|| (typeof thing == "undefined") 
+	if((thing == undefined)
+			|| (typeof thing == "undefined")
 			|| (typeof thing.offset == "undefined")) {
 		return getElementX(obj);
 	}
 	if(monthOff % 2 == 1) {
 		day = 15;
 	}
-	var dateString = 
-		zeroPad(year + firstYear) + 
+	var dateString =
+		zeroPad(year + firstYear) +
 		zeroPad(monthOfYear+1,2) +
 		zeroPad(day,2) + "000000";
 
        </td>
        <td style="vertical-align:bottom;padding:5px 0 0 0!important;" rowspan="2">
            <table style="border-collapse:collapse;width:110px;color:#99a;font-family:'Helvetica','Lucida Grande','Arial',sans-serif;"><tbody>
-			
+
            <!-- NEXT/PREV MONTH NAV AND MONTH INDICATOR -->
            <tr style="width:110px;height:16px;font-size:10px!important;">
            	<td style="padding-right:9px;font-size:11px!important;font-weight:bold;text-transform:uppercase;text-align:right;white-space:nowrap;overflow:visible;" nowrap="nowrap">
-               
+
                        Jul
-                       
+
                </td>
                <td id="displayMonthEl" style="background:#000;color:#ff0;font-size:11px!important;font-weight:bold;text-transform:uppercase;width:34px;height:15px;padding-top:1px;text-align:center;" title="You are here: 6:58:20 Aug 24, 2010">AUG</td>
 				<td style="padding-left:9px;font-size:11px!important;font-weight:bold;text-transform:uppercase;white-space:nowrap;overflow:visible;" nowrap="nowrap">
-               
+
                        Sep
-                       
+
                </td>
            </tr>
 
            <!-- NEXT/PREV CAPTURE NAV AND DAY OF MONTH INDICATOR -->
            <tr>
                <td style="padding-right:9px;white-space:nowrap;overflow:visible;text-align:right!important;vertical-align:middle!important;" nowrap="nowrap">
-               
+
                        <img src="file:///home/shlomif/OVID_CGI/staticweb.archive.org/images/toolbar/wm_tb_prv_off.png" alt="Previous capture" width="14" height="16" border="0" />
-                       
+
                </td>
                <td id="displayDayEl" style="background:#000;color:#ff0;width:34px;height:24px;padding:2px 0 0 0;text-align:center;font-size:24px;font-weight: bold;" title="You are here: 6:58:20 Aug 24, 2010">24</td>
 				<td style="padding-left:9px;white-space:nowrap;overflow:visible;text-align:left!important;vertical-align:middle!important;" nowrap="nowrap">
-               
+
                        <img src="file:///home/shlomif/OVID_CGI/staticweb.archive.org/images/toolbar/wm_tb_nxt_off.png" alt="Next capture" width="14" height="16" border="0"/>
-                       
+
 			    </td>
            </tr>
 
            <!-- NEXT/PREV YEAR NAV AND YEAR INDICATOR -->
            <tr style="width:110px;height:13px;font-size:9px!important;">
 				<td style="padding-right:9px;font-size:11px!important;font-weight: bold;text-align:right;white-space:nowrap;overflow:visible;" nowrap="nowrap">
-               
+
                        2009
-                       
+
                </td>
                <td id="displayYearEl" style="background:#000;color:#ff0;font-size:11px!important;font-weight: bold;padding-top:1px;width:34px;height:13px;text-align:center;" title="You are here: 6:58:20 Aug 24, 2010">2010</td>
 				<td style="padding-left:9px;font-size:11px!important;font-weight: bold;white-space:nowrap;overflow:visible;" nowrap="nowrap">
-               
+
                        2011
-                       
+
 				</td>
            </tr>
            </tbody></table>
        <a style="position:relative; white-space:nowrap; width:450px;height:27px;" href="" id="wm-graph-anchor">
        <div id="wm-ipp-sparkline" style="position:relative; white-space:nowrap; width:450px;height:27px;background-color:#fff;cursor:pointer;border-right:1px solid #ccc;" title="Explore captures for this URL">
 			<img id="sparklineImgId" style="position:absolute; z-index:9012; top:0px; left:0px;"
-				onmouseover="showTrackers('inline');" 
+				onmouseover="showTrackers('inline');"
 				onmouseout="showTrackers('none');"
 				onmousemove="trackMouseMove(event,this)"
 				alt="sparklines"
 				height="27"
 				border="0"
 				src="file:///home/shlomif/OVID_CGI/wayback.archive.org/web/jsp/graph.jsp"></img>
-			<img id="wbMouseTrackYearImg" 
+			<img id="wbMouseTrackYearImg"
 				style="display:none; position:absolute; z-index:9010;"
-				width="25" 
+				width="25"
 				height="27"
 				border="0"
 				src="file:///home/shlomif/OVID_CGI/staticweb.archive.org/images/toolbar/transp-yellow-pixel.png"></img>
 			<img id="wbMouseTrackMonthImg"
-				style="display:none; position:absolute; z-index:9011; " 
+				style="display:none; position:absolute; z-index:9011; "
 				width="2"
-				height="27" 
+				height="27"
 				border="0"
 				src="file:///home/shlomif/OVID_CGI/staticweb.archive.org/images/toolbar/transp-red-pixel.png"></img>
        </div>
       <li>Optional "remember me" checkbox</li>
     </ul>
 
-<p>Grabbing this data is simple.  Merely use the 
-<a href="http://search.cpan.org/~lds/CGI.pm-3.42/CGI.pm#FETCHING_THE_VALUE_OR_VALUES_OF_A_SINGLE_NAMED_PARAMETER:"><tt>CGI::param()</tt></a> 
+<p>Grabbing this data is simple.  Merely use the
+<a href="http://search.cpan.org/~lds/CGI.pm-3.42/CGI.pm#FETCHING_THE_VALUE_OR_VALUES_OF_A_SINGLE_NAMED_PARAMETER:"><tt>CGI::param()</tt></a>
 method.  For instance, if you have a form element named "<tt>foo</tt>", you
 merely use a statment like "<tt>my $form_foo = $q-&gt;param( 'foo' );</tt>".
 Pretty easy, huh?  Now, let's take a look at the three form elements we need to
 11:
 12:  my $userfile = USER_DATA . $username;
 13:  my $message = 'Bad password';
-14:  open USER, "&lt; $userfile" 
+14:  open USER, "&lt; $userfile"
 15:      or display_page( "No user named $username was found" ), exit;
 16:  chomp ( my ( $real_password, $sessionID, $remember ) = &lt;USER&gt; );
 17:  close USER;
 <li>This is the biggie:  there was no check to see if the username was safe to
 use to open a file (line 14).  Trying usernames like '../../../etc/passwd' is
 fairly common and, with sufficiently complex programs, can have unpredictable
-results.</li> 
+results.</li>
 
 <li>The password has been stored in plain text (line 19).  If someone gets the
 file, the password is available for everyone.</li>

File src/uses/web/ovids_cgi_course/lesson_6.html

 	if(val == "inline") {
 		document.getElementById("displayYearEl").style.color = "#ec008c";
 		document.getElementById("displayMonthEl").style.color = "#ec008c";
-		document.getElementById("displayDayEl").style.color = "#ec008c";		
+		document.getElementById("displayDayEl").style.color = "#ec008c";
 	} else {
 		document.getElementById("displayYearEl").innerHTML = displayYear;
 		document.getElementById("displayYearEl").style.color = "#ff0";
 }
 function getElementX2(obj) {
 	var thing = jQuery(obj);
-	if((thing == undefined) 
-			|| (typeof thing == "undefined") 
+	if((thing == undefined)
+			|| (typeof thing == "undefined")
 			|| (typeof thing.offset == "undefined")) {
 		return getElementX(obj);
 	}
 	if(monthOff % 2 == 1) {
 		day = 15;
 	}
-	var dateString = 
-		zeroPad(year + firstYear) + 
+	var dateString =
+		zeroPad(year + firstYear) +
 		zeroPad(monthOfYear+1,2) +
 		zeroPad(day,2) + "000000";
 
        </td>
        <td style="vertical-align:bottom;padding:5px 0 0 0!important;" rowspan="2">
            <table style="border-collapse:collapse;width:110px;color:#99a;font-family:'Helvetica','Lucida Grande','Arial',sans-serif;"><tbody>
-			
+
            <!-- NEXT/PREV MONTH NAV AND MONTH INDICATOR -->
            <tr style="width:110px;height:16px;font-size:10px!important;">
            	<td style="padding-right:9px;font-size:11px!important;font-weight:bold;text-transform:uppercase;text-align:right;white-space:nowrap;overflow:visible;" nowrap="nowrap">
-               
+
 		                <a href="lesson_6.html" style="text-decoration:none;color:#33f;font-weight:bold;background-color:transparent;border:none;" title="11 May 2009"><strong>MAY</strong></a>
-		                
+
                </td>
                <td id="displayMonthEl" style="background:#000;color:#ff0;font-size:11px!important;font-weight:bold;text-transform:uppercase;width:34px;height:15px;padding-top:1px;text-align:center;" title="You are here: 7:55:17 Aug 24, 2010">AUG</td>
 				<td style="padding-left:9px;font-size:11px!important;font-weight:bold;text-transform:uppercase;white-space:nowrap;overflow:visible;" nowrap="nowrap">
-               
+
 		                <a href="lesson_6.html" style="text-decoration:none;color:#33f;font-weight:bold;background-color:transparent;border:none;" title="23 Oct 2010"><strong>OCT</strong></a>
-		                
+
                </td>
            </tr>
 
            <!-- NEXT/PREV CAPTURE NAV AND DAY OF MONTH INDICATOR -->
            <tr>
                <td style="padding-right:9px;white-space:nowrap;overflow:visible;text-align:right!important;vertical-align:middle!important;" nowrap="nowrap">
-               
+
 		                <a href="lesson_6.html" title="3:13:51 May 11, 2009" style="background-color:transparent;border:none;"><img src="file:///home/shlomif/OVID_CGI/staticweb.archive.org/images/toolbar/wm_tb_prv_on.png" alt="Previous capture" width="14" height="16" border="0" /></a>
-		                
+
                </td>
                <td id="displayDayEl" style="background:#000;color:#ff0;width:34px;height:24px;padding:2px 0 0 0;text-align:center;font-size:24px;font-weight: bold;" title="You are here: 7:55:17 Aug 24, 2010">24</td>
 				<td style="padding-left:9px;white-space:nowrap;overflow:visible;text-align:left!important;vertical-align:middle!important;" nowrap="nowrap">
-               
+
 		                <a href="lesson_6.html" title="18:36:17 Oct 23, 2010" style="background-color:transparent;border:none;"><img src="file:///home/shlomif/OVID_CGI/staticweb.archive.org/images/toolbar/wm_tb_nxt_on.png" alt="Next capture" width="14" height="16" border="0"/></a>
-		                
+
 			    </td>
            </tr>
 
            <!-- NEXT/PREV YEAR NAV AND YEAR INDICATOR -->
            <tr style="width:110px;height:13px;font-size:9px!important;">
 				<td style="padding-right:9px;font-size:11px!important;font-weight: bold;text-align:right;white-space:nowrap;overflow:visible;" nowrap="nowrap">
-               
+
 		                <a href="lesson_6.html" style="text-decoration:none;color:#33f;font-weight:bold;background-color:transparent;border:none;" title="11 May 2009"><strong>2009</strong></a>
-		                
+
                </td>
                <td id="displayYearEl" style="background:#000;color:#ff0;font-size:11px!important;font-weight: bold;padding-top:1px;width:34px;height:13px;text-align:center;" title="You are here: 7:55:17 Aug 24, 2010">2010</td>
 				<td style="padding-left:9px;font-size:11px!important;font-weight: bold;white-space:nowrap;overflow:visible;" nowrap="nowrap">
-               
+
                        2011
-                       
+
 				</td>
            </tr>
            </tbody></table>
        <a style="position:relative; white-space:nowrap; width:450px;height:27px;" href="" id="wm-graph-anchor">
        <div id="wm-ipp-sparkline" style="position:relative; white-space:nowrap; width:450px;height:27px;background-color:#fff;cursor:pointer;border-right:1px solid #ccc;" title="Explore captures for this URL">
 			<img id="sparklineImgId" style="position:absolute; z-index:9012; top:0px; left:0px;"
-				onmouseover="showTrackers('inline');" 
+				onmouseover="showTrackers('inline');"
 				onmouseout="showTrackers('none');"
 				onmousemove="trackMouseMove(event,this)"