--- loncom/interface/lonfeedback.pm 2010/01/24 03:13:55 1.273.4.3 +++ loncom/interface/lonfeedback.pm 2010/01/24 23:20:16 1.273.4.4 @@ -1,7 +1,7 @@ # The LearningOnline Network # Feedback # -# $Id: lonfeedback.pm,v 1.273.4.3 2010/01/24 03:13:55 raeburn Exp $ +# $Id: lonfeedback.pm,v 1.273.4.4 2010/01/24 23:20:16 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2940,6 +2940,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*/>| + >.* + )}xs + ); +} sub newline_to_br { my ($message)=@_;