[LON-CAPA-cvs] cvs: loncom /homework imageresponse.pm

albertel lon-capa-cvs@mail.lon-capa.org
Tue, 24 Feb 2004 18:57:44 -0000


albertel		Tue Feb 24 13:57:44 2004 EDT

  Modified files:              
    /loncom/homework	imageresponse.pm 
  Log:
  - support <img src='stuf' /> too
  
  
Index: loncom/homework/imageresponse.pm
diff -u loncom/homework/imageresponse.pm:1.49 loncom/homework/imageresponse.pm:1.50
--- loncom/homework/imageresponse.pm:1.49	Mon Feb 23 18:55:40 2004
+++ loncom/homework/imageresponse.pm	Tue Feb 24 13:57:43 2004
@@ -2,7 +2,7 @@
 # The LearningOnline Network with CAPA
 # image click response style
 #
-# $Id: imageresponse.pm,v 1.49 2004/02/23 23:55:40 albertel Exp $
+# $Id: imageresponse.pm,v 1.50 2004/02/24 18:57:43 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -215,7 +215,7 @@
 sub clean_up_image {
     my ($image)=@_;
     if ($image =~ /\s*<img\s*/) {
-	($image) = ($image =~ /src\s*=\s*\"([^\"]+)\"/i);
+	($image) = ($image =~ /src\s*=\s*[\"\']([^\"\']+)[\"\']/i);
 	if ($image !~ /^http:/) {
 	    $image=&Apache::lonnet::hreflocation('',$image);
 	}