Index: openacs-4/packages/xowiki/tcl/xowiki-callback-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-callback-procs.tcl,v diff -u -r1.49 -r1.50 --- openacs-4/packages/xowiki/tcl/xowiki-callback-procs.tcl 31 Oct 2008 02:01:30 -0000 1.49 +++ openacs-4/packages/xowiki/tcl/xowiki-callback-procs.tcl 31 Oct 2008 14:39:55 -0000 1.50 @@ -495,21 +495,20 @@ } } - proc ::xowiki::tidy args {eval ::xowiki::Tidy clean $args} - - Object create Tidy - Tidy proc clean {text} { - if {[[::xo::cc package_id] get_parameter tidy 0]} { + Object create tidy + tidy proc clean {text} { + if {[[::xo::cc package_id] get_parameter tidy 0] + && [info command ::util::which] ne ""} { set tidycmd [::util::which tidy] if {$tidycmd ne ""} { set in_file [ns_tmpnam] ::xowiki::write_file $in_file $text catch {exec $tidycmd -q -w 0 -ashtml < $in_file 2> /dev/null} output file delete $in_file #my msg o=$output - regexp \n(.*)\n $output _ output - #my msg o=$output - return $output + regexp \n(.*)\n $output _ text + #my msg o=$text + return $text } } return $text Index: openacs-4/packages/xowiki/tcl/xowiki-form-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-form-procs.tcl,v diff -u -r1.110 -r1.111 --- openacs-4/packages/xowiki/tcl/xowiki-form-procs.tcl 31 Oct 2008 00:50:53 -0000 1.110 +++ openacs-4/packages/xowiki/tcl/xowiki-form-procs.tcl 31 Oct 2008 14:39:55 -0000 1.111 @@ -296,10 +296,10 @@ if {[info exists page_order] && $page_order ne ""} { set page_order [string trim $page_order " ."] } - #$data set text [::xowiki::tidy [$data set text]]- foreach {text format} [my var text] break - my var text [list [list [::xowiki::tidy $text] $format]] + my var text [list [list [::xowiki::tidy clean $text] $format]] } + WikiForm instproc update_references {} { my instvar data folder_id if {![my istype PageInstanceForm]} { @@ -754,7 +754,7 @@ if {$form eq ""} {return 1} dom parse -simple -html [lindex $form 0] doc $doc documentElement root - return [expr {[$root nodeName] eq "form"}] + return [expr {$root ne "" && [$root nodeName] eq "form"}] } Class create FormForm -superclass ::xowiki::PageTemplateForm \ @@ -768,7 +768,7 @@ {name {\[::xowiki::validate_name\]} {Another item with this name exists \ already in this folder}} {text {\[::xowiki::validate_form_text\]} {Form must contain a valid template}} - {form {\[::xowiki::validate_form_form\]} {Form must contain an HTML form}} + {form {\[::xowiki::validate_form_form\]} {Form must contain a toplevel HTML form element}} {form_constraints {\[::xowiki::validate_form_constraints\]} {Invalid form constraints}} }} }