[LON-CAPA-cvs] cvs: rat / lonpage.pm

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 14 Feb 2002 20:45:16 -0000


albertel		Thu Feb 14 15:45:16 2002 EDT

  Modified files:              
    /rat	lonpage.pm 
  Log:
  - was bombing on javascript links
  
  
Index: rat/lonpage.pm
diff -u rat/lonpage.pm:1.30 rat/lonpage.pm:1.31
--- rat/lonpage.pm:1.30	Sun Dec 16 19:57:59 2001
+++ rat/lonpage.pm	Thu Feb 14 15:45:16 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Page Handler
 #
-# $Id: lonpage.pm,v 1.30 2001/12/17 00:57:59 harris41 Exp $
+# $Id: lonpage.pm,v 1.31 2002/02/14 20:45:16 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -304,7 +304,10 @@
                               $thisdir=~s/\/[^\/]*$//;
 			      foreach (@rlinks) {
 				  unless (($_=~/^http:\/\//i) ||
-                                          ($_=~/^\//)) {
+					  ($_=~/^\//) ||
+					  ($_=~/^javascript:/i) ||
+					  ($_=~/^mailto:/i) ||
+					  ($_=~/^\#/)) {
 				      my $newlocation=
 				    &Apache::lonnet::hreflocation($thisdir,$_);
                      $output=~s/(\"|\'|\=\s*)$_(\"|\'|\s|\>)/$1$newlocation$2/;