--- loncom/interface/lonfeedback.pm 2009/11/21 22:36:23 1.279 +++ loncom/interface/lonfeedback.pm 2009/11/26 05:21:43 1.280 @@ -1,7 +1,7 @@ # The LearningOnline Network # Feedback # -# $Id: lonfeedback.pm,v 1.279 2009/11/21 22:36:23 www Exp $ +# $Id: lonfeedback.pm,v 1.280 2009/11/26 05:21:43 faziophi Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2949,7 +2949,19 @@ sub show_preview { ); } - +sub contains_block_html { + my ($message)=@_; + return ($message =~ m/ + <(br|h1|h2|h3|h4|h5|h6|p|ol|ul|table|pre|address|blockquote|center|div) + [\s]* + ([\w]+\=['"][\w]+['"])* + [\s]* + ( + [\s]*[\/]>| + >.*<\/\1[\s]*> + )/x ); +} + sub newline_to_br { my ($message)=@_; my $newmessage;