Index: openacs-4/packages/news/www/preview.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news/www/preview.tcl,v diff -u -r1.21 -r1.22 --- openacs-4/packages/news/www/preview.tcl 22 Dec 2009 22:24:02 -0000 1.21 +++ openacs-4/packages/news/www/preview.tcl 26 Dec 2009 23:27:56 -0000 1.22 @@ -11,7 +11,7 @@ action:notnull,trim publish_title:notnull,trim {publish_lead {}} - {publish_body:html,trim ""} + {publish_body:trim ""} publish_body.format:notnull {revision_log: ""} text_file:optional @@ -31,6 +31,17 @@ } -validate { + content_html -requires {publish_body publish_body.format} { + if { ${publish_body.format} eq "text/html" || + ${publish_body.format} eq "text/enhanced" } { + set complaint [ad_html_security_check $publish_body] + if { ![empty_string_p $complaint] } { + ad_complain $complaint + return + } + } + } + check_revision_log -requires {action revision_log} { if { ![string match $action "News Item"] && [empty_string_p $revision_log]} { ad_complain "[_ news.lt_You_must_supply_a_rev]"