mirror of
https://github.com/webmin/webmin.git
synced 2026-02-03 06:03:28 +00:00
Use correct quoting function for JS
This commit is contained in:
@@ -187,10 +187,10 @@ EOF
|
||||
|
||||
if ($f eq "..") {
|
||||
$dir =~ /^(.*\/)[^\/]+\/$/;
|
||||
$link = "<a href=\"\" onClick='parentdir(\""."e_escape($1)."\"); return false'>";
|
||||
$link = "<a href=\"\" onClick='parentdir(\"".quotemeta($1)."\"); return false'>";
|
||||
}
|
||||
else {
|
||||
$link = "<a href=\"\" onClick='fileclick(\""."e_escape("$dir$f")."\", $isdir); return false'>";
|
||||
$link = "<a href=\"\" onClick='fileclick(\"".quotemeta("$dir$f")."\", $isdir); return false'>";
|
||||
}
|
||||
local @cols;
|
||||
push(@cols, "$link<img border=0 src=$gconfig{'webprefix'}/images/$icon></a>");
|
||||
|
||||
@@ -32,7 +32,7 @@ if ($in{'multi'}) {
|
||||
print "selr = new Array($len);\n";
|
||||
for($i=0; $i<$len; $i++) {
|
||||
print "sel[$i] = \"".
|
||||
"e_escape($ul[$i], '"')."\";\n";
|
||||
quotemeta($ul[$i], '"')."\";\n";
|
||||
|
||||
# samba valid system group can start with @ + &
|
||||
$gn = $ul[$i];
|
||||
@@ -45,7 +45,7 @@ if ($in{'multi'}) {
|
||||
@{$members{$ginfo[2]}} );
|
||||
if (@mems > 3) { @mems = (@mems[0..1], "..."); }
|
||||
print "selr[$i] = \"",
|
||||
"e_escape(join(' ', @mems), "'"),"\";\n";
|
||||
quotemeta(join(' ', @mems), "'"),"\";\n";
|
||||
}
|
||||
else { print "selr[$i] = \"???\";\n"; }
|
||||
}
|
||||
|
||||
@@ -89,11 +89,11 @@ while(1) {
|
||||
next if (defined($lastpc) && $pc == $lastpc);
|
||||
print "<script>\n";
|
||||
print "document.forms[0].file.value = \"".
|
||||
"e_escape($filename)."\";\n";
|
||||
quotemeta($filename)."\";\n";
|
||||
print "document.forms[0].size.value = \"".
|
||||
"e_escape(&text('uptracker_of',
|
||||
&nice_size($size),
|
||||
&nice_size($totalsize)))."\";\n";
|
||||
quotemeta(&text('uptracker_of',
|
||||
&nice_size($size),
|
||||
&nice_size($totalsize)))."\";\n";
|
||||
print "document.forms[0].pc.value = \"".("|" x $pc)."\";\n";
|
||||
print "</script>\n";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user