Latex za izvoze: (IZVOZ-103): Resitev za Pdf izvoz vprasalnika ne deluje, ce blok vsebuje znak &

This commit is contained in:
patrik2020 2022-09-21 21:51:07 +02:00
parent 572d4083f9
commit 07044d86ce

View File

@ -259,8 +259,9 @@ class LatexSurveyElement{
$parents = Cache::srv_branching($spremenljivke['id'], 0)['parent'];
//echo "parents: ".$parents."</br>";
if($parents){
$tex .= $this->displayIf($parents);
//echo "blok: ".$this->displayIf($parents)."</br>";
$tex .= $this->encodeText($this->displayIf($parents));
//$tex .= $this->displayIf($parents);
//echo "blok: ".$this->encodeText($this->displayIf($parents))."</br>";
$tex .= $this->texNewLine;
}
#preuredil kodo, da zadeva deluje tako kot ta stara, ki se nahaja nad tem
@ -934,9 +935,9 @@ class LatexSurveyElement{
$text = str_replace('_','\_ ',$text);
$text = str_replace('~','\textasciitilde{} ',$text);
if(strpos($text, '&amp;')){ //ce je prisotno v besedilu &amp;'
$text = str_replace('&amp;','\& ',$text);
$text = str_replace('&amp;','\&',$text);
}else{
$text = str_replace('&','\& ',$text);
$text = str_replace('&','\&',$text);
}
$text = str_replace('&nbsp;','~',$text);
//$text = str_replace('&lt;','\textless ',$text);