--- loncom/xml/lonxml.pm 2016/08/09 23:43:39 1.556 +++ loncom/xml/lonxml.pm 2017/02/16 18:17:53 1.557 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # XML Parser Module # -# $Id: lonxml.pm,v 1.556 2016/08/09 23:43:39 raeburn Exp $ +# $Id: lonxml.pm,v 1.557 2017/02/16 18:17:53 damieng Exp $ # # Copyright Michigan State University Board of Trustees # @@ -991,7 +991,7 @@ sub decreasedepth { sub get_id { my ($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 -','"'.$id.'"')); } if ($id =~ /^\s*$/) { $id = $Apache::lonxml::curdepth; }