BUG 0000 "Problem in OutputDocuments with report generator TCPDF" SOLVED
- Problem with fonts in OutputDocuments with report generator TCPDF - The problem specifically is with the font tag, this tag is obsolete - Solved problem, added validation when use font tag * Available from version ProcessMaker-2.0.46
This commit is contained in:
@@ -1679,14 +1679,17 @@ class G
|
||||
*/
|
||||
public function replaceDataGridField($sContent, $aFields)
|
||||
{
|
||||
$nrt = array("\n", "\r", "\t");
|
||||
$nrthtml = array("(n /)", "(r /)", "(t /)");
|
||||
$sContent = G::unhtmlentities($sContent);
|
||||
$nrt = array("\n", "\r", "\t");
|
||||
$nrthtml = array("(n /)", "(r /)", "(t /)");
|
||||
|
||||
$sContent = G::unhtmlentities($sContent);
|
||||
$strContentAux = str_replace($nrt, $nrthtml, $sContent);
|
||||
$iOcurrences = preg_match_all('/\@(?:([\>])([a-zA-Z\_]\w*)|([a-zA-Z\_][\w\-\>\:]*)\(((?:[^\\\\\)]*(?:[\\\\][\w\W])?)*)\))((?:\s*\[[\'"]?\w+[\'"]?\])+)?/', $strContentAux, $arrayMatch1, PREG_PATTERN_ORDER | PREG_OFFSET_CAPTURE);
|
||||
|
||||
$iOcurrences = preg_match_all('/\@(?:([\>])([a-zA-Z\_]\w*)|([a-zA-Z\_][\w\-\>\:]*)\(((?:[^\\\\\)]*(?:[\\\\][\w\W])?)*)\))((?:\s*\[[\'"]?\w+[\'"]?\])+)?/', $strContentAux, $arrayMatch1, PREG_PATTERN_ORDER | PREG_OFFSET_CAPTURE);
|
||||
|
||||
if ($iOcurrences) {
|
||||
$arrayGrid = array();
|
||||
|
||||
for ($i = 0; $i <= $iOcurrences - 1; $i++) {
|
||||
$arrayGrid[] = $arrayMatch1[2][$i][0];
|
||||
}
|
||||
@@ -1694,10 +1697,12 @@ class G
|
||||
$arrayGrid = array_unique($arrayGrid);
|
||||
|
||||
foreach ($arrayGrid as $index => $value) {
|
||||
$grdName = $value;
|
||||
$grdName = $value;
|
||||
|
||||
$strContentAux1 = $strContentAux;
|
||||
$strContentAux = null;
|
||||
$ereg = "/^(.*)@>" . $grdName . "(.*)@<" . $grdName . "(.*)$/";
|
||||
|
||||
$ereg = "/^(.*)@>" . $grdName . "(.*)@<" . $grdName . "(.*)$/";
|
||||
|
||||
while (preg_match($ereg, $strContentAux1, $arrayMatch2)) {
|
||||
$strData = null;
|
||||
@@ -1709,23 +1714,29 @@ class G
|
||||
$aRow[$sKey] = nl2br($aRow[$sKey]);
|
||||
}
|
||||
}
|
||||
|
||||
$strData = $strData . G::replaceDataField($arrayMatch2[2], $aRow);
|
||||
}
|
||||
}
|
||||
|
||||
$strContentAux1 = $arrayMatch2[1];
|
||||
$strContentAux = $strData . $arrayMatch2[3] . $strContentAux;
|
||||
}
|
||||
|
||||
$strContentAux = $strContentAux1 . $strContentAux;
|
||||
}
|
||||
}
|
||||
|
||||
$strContentAux = str_replace($nrthtml, $nrt, $strContentAux);
|
||||
$sContent = $strContentAux;
|
||||
|
||||
$sContent = $strContentAux;
|
||||
|
||||
foreach ($aFields as $sKey => $vValue) {
|
||||
if (!is_array($vValue)) {
|
||||
$aFields[$sKey] = nl2br($aFields[$sKey]);
|
||||
}
|
||||
}
|
||||
|
||||
$sContent = G::replaceDataField($sContent, $aFields);
|
||||
|
||||
return $sContent;
|
||||
|
||||
Reference in New Issue
Block a user