From aff790b94e4679bf6e1b6e181e9dc28ecf1c75ba Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Tue, 23 Jan 2001 14:28:41 +0000 Subject: [PATCH] Minor fix for anchor references. --- robot.tcl | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/robot.tcl b/robot.tcl index bad9a25..9b672cd 100755 --- a/robot.tcl +++ b/robot.tcl @@ -1,5 +1,5 @@ #!/usr/bin/tclsh -# $Id: robot.tcl,v 1.11 2001/01/23 11:26:43 adam Exp $ +# $Id: robot.tcl,v 1.12 2001/01/23 14:28:41 adam Exp $ # proc RobotFileNext1 {area lead} { puts "RobotFileNext1 area=$area lead=$lead" @@ -281,16 +281,18 @@ proc RobotHref {url hrefx hostx pathx} { if {![string length $surl]} { set surl / } - set ok 0 - foreach domain $domains { - if {[string match $domain $host]} { - set ok 1 - break + if {[info exist domains]} { + set ok 0 + foreach domain $domains { + if {[string match $domain $host]} { + set ok 1 + break + } } - } - if {!$ok} { - return 0 - } + if {!$ok} { + return 0 + } + } } else { regexp {^([^\#]*)} $hpath x surl set host $URL($url,hostport) @@ -429,7 +431,7 @@ proc RobotTextHtml {url out} { puts $out "" puts $out $nbody puts $out "" - } a { + } -nonest a { if {![info exists parm(href)]} { puts "no href" continue -- 1.7.10.4