mirror of
https://abf.rosa.ru/djam/urpm-tools.git
synced 2025-02-23 17:32:46 +00:00
URPM-repoclosure 1.4.5: handling special chars in the HTML report.
This commit is contained in:
parent
c3716f4a50
commit
ee36b6441c
1 changed files with 13 additions and 4 deletions
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/perl
|
||||
########################################################
|
||||
# URPM Repo Closure Checker 1.4.4 for Linux
|
||||
# URPM Repo Closure Checker 1.4.5 for Linux
|
||||
# A tool for checking closure of a set of RPM packages
|
||||
#
|
||||
# Copyright (C) 2011-2012 ROSA Laboratory
|
||||
|
@ -38,7 +38,7 @@ use File::Copy qw(copy move);
|
|||
use Data::Dumper;
|
||||
use strict;
|
||||
|
||||
my $TOOL_VERSION = "1.4.4";
|
||||
my $TOOL_VERSION = "1.4.5";
|
||||
my $CmdName = get_filename($0);
|
||||
|
||||
my ($Help, $ShowVersion, $RPMlist, $RPMdir, $StaticMode,
|
||||
|
@ -968,7 +968,7 @@ sub staticCheck()
|
|||
$Report .= $Dep." (required by $Pkg)\n";
|
||||
my $Class = " class='even'";
|
||||
$Class = "" if($Num++ % 2 != 0);
|
||||
$VReport .= "<tr$Class><td>$Dep</td><td>$Pkg</td></tr>\n";
|
||||
$VReport .= "<tr$Class><td>".htmlSpecChars($Dep)."</td><td>$Pkg</td></tr>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1000,7 +1000,7 @@ sub staticCheck()
|
|||
$Report .= $Dep." (required by $Pkg)\n";
|
||||
my $Class = " class='even'";
|
||||
$Class = "" if($Num++ % 2 != 0);
|
||||
$VReport .= "<tr$Class><td>$Dep</td><td>$Pkg</td></tr>\n";
|
||||
$VReport .= "<tr$Class><td>".htmlSpecChars($Dep)."</td><td>$Pkg</td></tr>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1134,6 +1134,15 @@ table.report td {
|
|||
}
|
||||
}
|
||||
|
||||
sub htmlSpecChars($)
|
||||
{
|
||||
my $Str = $_[0];
|
||||
$Str=~s/\&([^#]|\Z)/&$1/g;
|
||||
$Str=~s/</</g;
|
||||
$Str=~s/>/>/g;
|
||||
return $Str;
|
||||
}
|
||||
|
||||
sub show_number($)
|
||||
{
|
||||
if($_[0])
|
||||
|
|
Loading…
Add table
Reference in a new issue