unset meta attributes (so they are reset for next meta)
[tclrobot.git] / robot.tcl
index bfe875f..e67a9b8 100755 (executable)
--- a/robot.tcl
+++ b/robot.tcl
@@ -1,5 +1,5 @@
 #!/usr/bin/tclsh 
-# $Id: robot.tcl,v 1.32 2002/03/25 16:11:08 adam Exp $
+# $Id: robot.tcl,v 1.34 2002/06/18 19:57:53 adam Exp $
 #
 proc RobotFileNext1 {area lead} {
     # puts "RobotFileNext1 area=$area lead=$lead"
@@ -288,9 +288,8 @@ proc RobotHref {url hrefx hostx pathx} {
     if {[string length $href] > 256} {
        return 0
     }
-#    if {[string first {?} $href] >= 0} {
-#      return 0
-#    }
+
+#   Skip pages that have ? in them
 #    if {[string first {?} $url] >= 0 && [string first {?} $href] >= 0} {
 #      return 0
 #    }
@@ -518,7 +517,8 @@ proc RobotTextHtml {url out} {
             set metaname {}
             set metacontent {}
             puts -nonewline $out "<meta"
-            foreach a [array names parm] {
+           set al [array names parm]
+            foreach a $al {
                 set al [string tolower $a]
                puts -nonewline $out " $al"
                 puts -nonewline $out {="}
@@ -532,6 +532,7 @@ proc RobotTextHtml {url out} {
                         set metacontent $parm($a)
                     }
                 }
+               unset parm($al)
             }
            puts $out "></meta>"
             # go through robots directives (af any)