Index: openacs-4/packages/xowiki/tcl/xowiki-sc-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-sc-procs.tcl,v diff -u -r1.50 -r1.50.2.1 --- openacs-4/packages/xowiki/tcl/xowiki-sc-procs.tcl 27 Jan 2019 17:07:55 -0000 1.50 +++ openacs-4/packages/xowiki/tcl/xowiki-sc-procs.tcl 27 Feb 2019 11:18:04 -0000 1.50.2.1 @@ -40,15 +40,17 @@ switch [dict get $d mime] { text/html { set content [dict get $d html] - try { - dom parse -simple -html $content doc - $doc documentElement root - foreach n [$root selectNodes {//script|//noscript|//style//nav|//button}] { - $n delete + if {![string is space $content]} { + try { + dom parse -simple -html $content doc + $doc documentElement root + foreach n [$root selectNodes {//script|//noscript|//style//nav|//button}] { + $n delete + } + set content [$root asHTML] + } on error {errorMsg} { + ns_log notice "xowiki::datasource: could not parse result of search_render for page $page: $errorMsg" } - set content [$root asHTML] - } on error {errorMsg} { - ns_log notice "xowiki::datasource: could not parse result of search_render for page $page: $errorMsg" } # # The function ad_html_text_convert can take forever on largish