Index: openacs-4/packages/search/tcl/syndicate-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/search/tcl/syndicate-procs.tcl,v diff -u -r1.4.2.2 -r1.4.2.3 --- openacs-4/packages/search/tcl/syndicate-procs.tcl 8 Jun 2022 14:02:14 -0000 1.4.2.2 +++ openacs-4/packages/search/tcl/syndicate-procs.tcl 8 Jun 2022 14:08:13 -0000 1.4.2.3 @@ -45,7 +45,7 @@ set published [lc_time_fmt $syn(pubDate) "%a, %d %b %Y %H:%M:%S GMT"] - set xmlMap [list & "&" < "<" > ">" \" """ ' "'" \x00 ""] + set xmlMap [list & "&" < "<" > ">" \" """ ' "'"] set rss_xml_frag " [string map $xmlMap $d(title)] [string map $xmlMap $url] @@ -58,6 +58,12 @@ " db_dml nuke {delete from syndication where object_id = :object_id} + + # Null character is forbidden in a database bind variable. We + # replace it with the empty string when found. + regsub -all \x00 $rss_xml_frag {} rss_xml_frag + regsub -all \x00 $body {} body + db_dml insert {insert into syndication(object_id, rss_xml_frag, body, url) values (:object_id, :rss_xml_frag, :body, :url) }