2
0
forked from Wavyzz/dolibarr

Fix scrutinizer

This commit is contained in:
Laurent Destailleur
2022-08-11 01:09:56 +02:00
parent 4fb3a2e296
commit d997dfc96e
5 changed files with 46 additions and 29 deletions

View File

@@ -247,6 +247,7 @@ class Diff
$html = '';
// loop over the lines in the diff
$element = 'unknown';
foreach ($diff as $line) {
// extend the HTML with the line
switch ($line[1]) {
@@ -260,10 +261,7 @@ class Diff
$element = 'ins';
break;
}
$html .=
'<'.$element.'>'
. htmlspecialchars($line[0])
. '</'.$element.'>';
$html .= '<'.$element.'>'.dol_escape_htmltag($line[0]).'</'.$element.'>';
// extend the HTML with the separator
$html .= $separator;
@@ -286,6 +284,8 @@ class Diff
// initialise the HTML
$html = $indentation."<table class=\"diff\">\n";
$rightCell = $leftCell = '';
// loop over the lines in the diff
$index = 0;
$nbdiff = count($diff);