From: Adam Dickmeiss Date: Tue, 23 Jan 2001 14:28:41 +0000 (+0000) Subject: Minor fix for anchor references. X-Git-Tag: ZMBOT.0.1~28 X-Git-Url: http://git.indexdata.com/?p=tclrobot.git;a=commitdiff_plain;h=aff790b94e4679bf6e1b6e181e9dc28ecf1c75ba Minor fix for anchor references. --- 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