зеркало из https://github.com/mozilla/gecko-dev.git
Bug 347105 - [p=reed r=timeless]
This commit is contained in:
Родитель
7a348ad3f8
Коммит
d32a138cc9
|
@ -770,7 +770,7 @@ sub FindPartition {
|
|||
exit;
|
||||
}
|
||||
PrintHeader();
|
||||
print h1("Searching for partitions matching $file ...");
|
||||
print h1("Searching for partitions matching " . html_quote($file) . " ...");
|
||||
foreach my $match (@matches) {
|
||||
if (param("view")) {
|
||||
# This should display modules just as they are displayed
|
||||
|
@ -790,7 +790,7 @@ sub FindPartition {
|
|||
}
|
||||
else {
|
||||
PrintHeader();
|
||||
print h1("Searching for partitions matching $file ...");
|
||||
print h1("Searching for partitions matching " . html_quote($file) . " ...");
|
||||
print "No partitions found.";
|
||||
}
|
||||
|
||||
|
|
|
@ -58,5 +58,21 @@ sub name_to_id_token {
|
|||
return $_;
|
||||
}
|
||||
|
||||
1;
|
||||
# Quotify a string, suitable for output as an html document
|
||||
sub html_quote {
|
||||
my ($var) = (@_);
|
||||
$var =~ s/\&/\&/g;
|
||||
$var =~ s/</\</g;
|
||||
$var =~ s/>/\>/g;
|
||||
return $var;
|
||||
}
|
||||
|
||||
# Quotify a string, suitable for invoking a shell process
|
||||
sub shell_escape {
|
||||
my ($file) = @_;
|
||||
$file =~ s/\000/_NULL_/g;
|
||||
$file =~ s/([ \"\'\`\~\^\?\$\&\|\!<>\(\)\[\]\;\:])/\\$1/g;
|
||||
return $file;
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
Загрузка…
Ссылка в новой задаче