Diff for /loncom/xml/lonxml.pm between versions 1.531.2.23 and 1.531.2.24

version 1.531.2.23, 2017/12/06 14:23:44 version 1.531.2.24, 2018/09/14 21:41:13
Line 70  use Safe::Hole(); Line 70  use Safe::Hole();
 use Math::Cephes();  use Math::Cephes();
 use Math::Random();  use Math::Random();
 use Math::Calculus::Expression();  use Math::Calculus::Expression();
   use Number::FormatEng();
 use Opcode();  use Opcode();
 use POSIX qw(strftime);  use POSIX qw(strftime);
 use Time::HiRes qw( gettimeofday tv_interval );  use Time::HiRes qw( gettimeofday tv_interval );
Line 441  sub latex_special_symbols { Line 442  sub latex_special_symbols {
     } else {      } else {
  $string=~s/\\/\\ensuremath{\\backslash}/g;   $string=~s/\\/\\ensuremath{\\backslash}/g;
  $string=~s/\\\%|\%/\\\%/g;   $string=~s/\\\%|\%/\\\%/g;
  $string=~s/\\\{|{/\\{/g;   $string=~s/\\\{|\{/\\{/g;
  $string=~s/\\}|}/\\}/g;   $string=~s/\\}|}/\\}/g;
  $string=~s/\\ensuremath\\\{\\backslash\\}/\\ensuremath{\\backslash}/g;   $string=~s/\\ensuremath\\\{\\backslash\\}/\\ensuremath{\\backslash}/g;
  $string=~s/\\\$|\$/\\\$/g;   $string=~s/\\\$|\$/\\\$/g;
Line 916  sub init_safespace { Line 917  sub init_safespace {
   $safehole->wrap(\&Apache::functionplotresponse::fpr_vectorlength,$safeeval,'&fpr_vectorlength');    $safehole->wrap(\&Apache::functionplotresponse::fpr_vectorlength,$safeeval,'&fpr_vectorlength');
   $safehole->wrap(\&Apache::functionplotresponse::fpr_vectorangle,$safeeval,'&fpr_vectorangle');    $safehole->wrap(\&Apache::functionplotresponse::fpr_vectorangle,$safeeval,'&fpr_vectorangle');
   $safehole->wrap(\&Math::Calculus::Expression::math_calculus_expression,$safeeval,'&math_calculus_expression');    $safehole->wrap(\&Math::Calculus::Expression::math_calculus_expression,$safeeval,'&math_calculus_expression');
     $safehole->wrap(\&Number::FormatEng::format_eng,$safeeval,'&number_format_eng');
     $safehole->wrap(\&Number::FormatEng::format_pref,$safeeval,'&number_format_pref');
   
 #  use Data::Dumper;  #  use Data::Dumper;
 #  $safehole->wrap(\&Data::Dumper::Dumper,$safeeval,'&LONCAPA_INTERNAL_Dumper');  #  $safehole->wrap(\&Data::Dumper::Dumper,$safeeval,'&LONCAPA_INTERNAL_Dumper');
Line 1088  sub decreasedepth { Line 1091  sub decreasedepth {
 sub get_id {  sub get_id {
     my ($parstack,$safeeval)=@_;      my ($parstack,$safeeval)=@_;
     my $id= &Apache::lonxml::get_param('id',$parstack,$safeeval);      my $id= &Apache::lonxml::get_param('id',$parstack,$safeeval);
     if ($env{'request.state'} eq 'construct' && $id =~ /([._]|[^\w\d\s[:punct:]])/) {      if ($env{'request.state'} eq 'construct' && $id =~ /([._]|[^\w\s\-])/) { 
  &error(&mt('ID [_1] contains invalid characters. IDs are only allowed to contain letters, numbers, spaces and -','"<tt>'.$id.'</tt>"'));   &error(&mt('ID [_1] contains invalid characters. IDs are only allowed to contain letters, numbers, spaces and -','"<tt>'.$id.'</tt>"'));
     }      }
     if ($id =~ /^\s*$/) { $id = $Apache::lonxml::curdepth; }      if ($id =~ /^\s*$/) { $id = $Apache::lonxml::curdepth; }
Line 2364  sub register_insert { Line 2367  sub register_insert {
   
 sub dump_insertlist {  sub dump_insertlist {
     my ($ext) = @_;      my ($ext) = @_;
     open(XML,">/tmp/insertlist.xml.$ext");      open(XML,">","/tmp/insertlist.xml.$ext");
     print XML ("<insertlist>");      print XML ("<insertlist>");
     my $i=0;      my $i=0;
   

Removed from v.1.531.2.23  
changed lines
  Added in v.1.531.2.24


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>