--- loncom/interface/loncommon.pm 2006/03/24 18:09:27 1.321 +++ loncom/interface/loncommon.pm 2006/03/24 21:40:11 1.322 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.321 2006/03/24 18:09:27 albertel Exp $ +# $Id: loncommon.pm,v 1.322 2006/03/24 21:40:11 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -3150,7 +3150,7 @@ sub end_page { sub html_encode { my ($result) = @_; - $result = &HTML::Entities::encode($result,'"'); + $result = &HTML::Entities::encode($result,'<>&"'); return $result; } @@ -3158,7 +3158,8 @@ sub js_ready { my ($result) = @_; $result =~ s/[\n\r]/ /g; - $result =~ s/'/\\'/g; + $result =~ s/'/\\'/g; + $result =~ s{}{}g; return $result; }