--- loncom/publisher/lonpubmenu.pm 2009/02/26 16:10:49 1.6 +++ loncom/publisher/lonpubmenu.pm 2015/06/09 21:23:27 1.7 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Construction Space Buttons for Top Frame # -# $Id: lonpubmenu.pm,v 1.6 2009/02/26 16:10:49 schafran Exp $ +# $Id: lonpubmenu.pm,v 1.7 2015/06/09 21:23:27 damieng Exp $ # # Copyright Michigan State University Board of Trustees # @@ -34,10 +34,13 @@ use Apache::loncommon; sub handler { my $r = shift; - my %lt=&Apache::lonlocal::texthash( + my %js_lt=&Apache::lonlocal::texthash( cnpd => 'Cannot publish directory', cnrd => 'Cannot retrieve directory', mcdi => 'Must create new subdirectory inside a directory', + ); + &js_escape(\%js_lt); + my %html_lt=&Apache::lonlocal::texthash( pubr => 'Publish this Resource', pubd => 'Publish this Directory', rtrv => 'Retrieve Old Version', @@ -63,6 +66,7 @@ sub handler { go => 'Go', prnt => 'Print' ); + &html_escape(\%html_lt); &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['disp']); my $disp = $env{'form.disp'}; # set defaults for parent directory in case frameloc is unable to determine directory @@ -121,7 +125,7 @@ function getactionfilename() { if ((document.fileaction.filename.value.charAt( document.fileaction.filename.value.length-1)!='/') && (document.fileaction.filename.value.indexOf('/adm/pubdir')==-1)) { - alert('$lt{'mcdi'}'); + alert('$js_lt{'mcdi'}'); return; } } @@ -208,7 +212,7 @@ function getfilename() { (document.publisher.filename.value.indexOf('/adm/pubdir')==-1)) { document.publisher.submit(); } else { - alert('$lt{'cnpd'}'); + alert('$js_lt{'cnpd'}'); } } @@ -219,7 +223,7 @@ function getrfilename() { (document.rpublisher.filename.value.indexOf('/adm/pubdir')==-1)) { document.rpublisher.submit(); } else { - alert('$lt{'cnrd'}'); + alert('$js_lt{'cnrd'}'); } } @@ -245,14 +249,14 @@ END
- +
'); } else { $r->print('
- +
'); } @@ -262,7 +266,7 @@ END
- +
@@ -270,7 +274,7 @@ END method="post" enctype="multipart/form-data"> - + @@ -278,7 +282,7 @@ END - + @@ -291,13 +295,13 @@ ENDTWO - +
- +
ENDDIR @@ -306,14 +310,14 @@ ENDDIR
- +
- +
ENDFILE @@ -324,26 +328,26 @@ ENDFILE    +