--- loncom/homework/edit.pm 2015/01/19 15:35:53 1.153 +++ loncom/homework/edit.pm 2017/10/04 13:00:41 1.153.2.1 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # edit mode helpers # -# $Id: edit.pm,v 1.153 2015/01/19 15:35:53 goltermann Exp $ +# $Id: edit.pm,v 1.153.2.1 2017/10/04 13:00:41 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -134,6 +134,7 @@ package Apache::edit; use strict; use Apache::lonnet; +use Apache::loncommon; use HTML::Entities(); use Apache::lonlocal; use lib '/home/httpd/lib/perl/'; @@ -788,13 +789,13 @@ sub element_change_detection { sub submit_ask_anyway { my ($extra_action) = @_; - my $resource = $env{'request.ambiguous'}; + my $resource = &Apache::loncommon::escape_single($env{'request.ambiguous'}); return ' onclick="saveScrollPosition(\''.$resource.'\');still_ask=true;'.$extra_action.';" '; } sub submit_dont_ask { my ($extra_action) = @_; - my $resource = $env{'request.ambiguous'}; + my $resource = &Apache::loncommon::escape_single($env{'request.ambiguous'}); return ' onclick="saveScrollPosition(\''.$resource.'\');is_submit=true;'.$extra_action.';" '; }