X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=robot.tcl;h=608f562c089c2d4a4593d57ccad33f0df826f866;hb=3201adca0560cf447024e23b0e572c9b5137111c;hp=3ab1d816a01651c5850c8d311d394da721bc3c98;hpb=64d3a6a403795bb44f89ffad04463fd7a8863184;p=tclrobot.git
diff --git a/robot.tcl b/robot.tcl
index 3ab1d81..608f562 100755
--- a/robot.tcl
+++ b/robot.tcl
@@ -1,5 +1,5 @@
#!/usr/bin/tclsh
-# $Id: robot.tcl,v 1.44 2003/06/11 10:11:39 adam Exp $
+# $Id: robot.tcl,v 1.47 2003/12/10 09:58:22 adam Exp $
#
proc RobotFileNext1 {area lead} {
# puts "RobotFileNext1 area=$area lead=$lead"
@@ -610,6 +610,15 @@ proc RobotRedirect {task url tourl code} {
}
}
+proc wellform {body} {
+ regsub -all {} $body { } abody
+ regsub -all -nocase {} $abody {} bbody
- regsub -all {<[^\>]+>} $bbody {} nbody
+ set bbody [wellform $body]
puts $out ""
- puts $out $nbody
+ puts $out $bbody
puts $out ""
}
} -nonest base {
@@ -729,7 +737,7 @@ proc RobotTextHtml {task url out} {
set href [string trim $parm(href)]
if {![RobotHref $task $url href host path]} continue
set URL($task,$url,bpath) $path
- } a {
+ } -nonest a {
# ..
# we're not using nonest - otherwise body isn't set
if {$nofollow} continue