mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-19 16:02:15 +00:00
Funktion clearHtmlTags zur Bereinigung von ul, li und br-Tags
Anwendung auf Lehrinhalte in Zertifikat
This commit is contained in:
@@ -882,4 +882,19 @@ function decryptData($value,$key)
|
||||
$decrypttext = mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $key, $crypttext, MCRYPT_MODE_ECB, $iv);
|
||||
return trim($decrypttext);
|
||||
}
|
||||
|
||||
function clearHtmlTags($text)
|
||||
{
|
||||
$text=mb_str_replace('<br>','\n',$text);
|
||||
$text=mb_str_replace('<br/>','\n',$text);
|
||||
$text=mb_str_replace('<br />','\n',$text);
|
||||
|
||||
$text=mb_str_replace('<ul>\n','',$text);
|
||||
$text=mb_str_replace('<ul>','',$text);
|
||||
$text=mb_str_replace('</ul>','',$text);
|
||||
$text=mb_str_replace('<li>','\n - ',$text);
|
||||
$text=mb_str_replace('</li>','',$text);
|
||||
|
||||
return $text;
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -236,6 +236,7 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml")
|
||||
$xml .= " <sws>".($sws==0?'':number_format(sprintf('%.1F',$sws),1))."</sws>";
|
||||
$xml .= " <ects>".number_format($ects,1)."</ects>";
|
||||
$xml .= " <lvleiter>".$leiter_titel." ".$leiter_vorname." ".$leiter_nachname.($leiter_titelpost!=''?', '.$leiter_titelpost:'')."</lvleiter>";
|
||||
// $xml .= " <lehrinhalte><![CDATA[".clearHtmlTags($lehrinhalte)."]]></lehrinhalte>";
|
||||
$xml .= " <lehrinhalte><![CDATA[".$lehrinhalte."]]></lehrinhalte>";
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user