From e0089f67c6cffbf59643ecde95de82e342958d0c Mon Sep 17 00:00:00 2001 From: patrik2020 Date: Fri, 12 Feb 2021 16:24:16 +0100 Subject: [PATCH] Latex za izvoze: preureditev izpisa ; namesto &, ko je zraven se presledek --- .../survey/export/latexclasses/class.LatexSurveyElement.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/admin/survey/export/latexclasses/class.LatexSurveyElement.php b/admin/survey/export/latexclasses/class.LatexSurveyElement.php index 58aa1e966..f8891aabf 100644 --- a/admin/survey/export/latexclasses/class.LatexSurveyElement.php +++ b/admin/survey/export/latexclasses/class.LatexSurveyElement.php @@ -803,6 +803,8 @@ class LatexSurveyElement{ //echo "Encoding ".$text."
"; //echo "vre_id: ".$vre_id."
"; //echo "ime spremenljivke ".$this->variableName."
"; + + $text = htmlspecialchars_decode($text); //vse html special chars kot je & spremeni v ustrezne simbole (npr. &=>&) //resevanje razbirajanja predolgih neprekinjenih besed in URL - spremenljivke za kasnejsi prilagojen izpis //$numOfWords = str_word_count($text, 0); @@ -911,9 +913,9 @@ class LatexSurveyElement{ $text = str_replace('_','\_ ',$text); $text = str_replace('~','\textasciitilde{} ',$text); if(strpos($text, '&')){ //ce je prisotno v besedilu &' - $text = str_replace('&','\& ',$text); + $text = str_replace('&','\& ',$text); }else{ - $text = str_replace('&','\& ',$text); + $text = str_replace('&','\& ',$text); } $text = str_replace(' ','~',$text); //$text = str_replace('<','\textless ',$text);