--- loncom/interface/loncommon.pm 2006/03/23 23:43:13 1.320 +++ 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.320 2006/03/23 23:43:13 albertel Exp $ +# $Id: loncommon.pm,v 1.322 2006/03/24 21:40:11 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2801,7 +2801,8 @@ form, .inline { display: inline; } style="margin-top: 0px;$addstyle" $addentries> END &Apache::lontexconvert::jsMath_reset(); - if ($env{'environment.texengine'} eq 'jsMath') { + if ($env{'environment.texengine'} eq 'jsMath' || + $env{'form.texengine'} eq 'jsMath' ) { $bodytag.=&Apache::lontexconvert::jsMath_header(); } @@ -3149,7 +3150,7 @@ sub end_page { sub html_encode { my ($result) = @_; - $result = &HTML::Entities::encode($result,'"'); + $result = &HTML::Entities::encode($result,'<>&"'); return $result; } @@ -3157,7 +3158,8 @@ sub js_ready { my ($result) = @_; $result =~ s/[\n\r]/ /g; - $result =~ s/'/\\'/g; + $result =~ s/'/\\'/g; + $result =~ s{}{}g; return $result; }