mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-21 08:52:21 +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;
|
||||
}
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user