--- loncom/interface/lonhtmlcommon.pm 2011/05/15 23:57:32 1.285.2.1 +++ loncom/interface/lonhtmlcommon.pm 2011/10/23 00:50:58 1.285.2.3 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common html routines # -# $Id: lonhtmlcommon.pm,v 1.285.2.1 2011/05/15 23:57:32 raeburn Exp $ +# $Id: lonhtmlcommon.pm,v 1.285.2.3 2011/10/23 00:50:58 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -60,6 +60,7 @@ use Time::Local; use Time::HiRes; use Apache::lonlocal; use Apache::lonnet; +use HTML::Entities(); use LONCAPA; sub java_not_enabled { @@ -83,6 +84,11 @@ sub raw_href_to_link { return $message; } +sub entity_encode { + my ($text)=@_; + return &HTML::Entities::encode($text, '<>&"'); +} + ############################################## ############################################## @@ -1227,9 +1233,9 @@ sub htmlareaheaders { ENDEDITOR } $s.=(< - - + + + ENDJQUERY return $s; }