[LON-CAPA-cvs] cvs: loncom(version_2_9_X) /interface lonfeedback.pm

raeburn raeburn@source.lon-capa.org
Sun, 24 Jan 2010 23:20:16 -0000


raeburn		Sun Jan 24 23:20:16 2010 EDT

  Modified files:              (Branch: version_2_9_X)
    /loncom/interface	lonfeedback.pm 
  Log:
  - Backport 1.280 and 1.286 (part).
  
  
Index: loncom/interface/lonfeedback.pm
diff -u loncom/interface/lonfeedback.pm:1.273.4.3 loncom/interface/lonfeedback.pm:1.273.4.4
--- loncom/interface/lonfeedback.pm:1.273.4.3	Sun Jan 24 03:13:55 2010
+++ loncom/interface/lonfeedback.pm	Sun Jan 24 23:20:16 2010
@@ -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 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*>
+        )}xs
+    );
+}
 
 sub newline_to_br {
     my ($message)=@_;