From 7e5264a3d07133ee60495d2206f80daadbb28afd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Alexander=20Nicolaysen=20S=C3=B8rnes?=
or
- $aDesc = explode("
",$aDesc[0],2);
- $aDesc = explode("
",$aDesc[0],2);
- $aDesc = explode("
",$aDesc[0],2); - $aDesc = explode("
",$aDesc[0],2);
- return trim(strip_tags($aDesc[0]));
+ // 1) maybe it's an html description and lines are separated with tags
+ $aReplace = array('
','
','
'); + $sDescription = str_replace($aReplace, "\n", $sDescription); + + // 2) let's split the dsecription into lines + $aDesc = explode("\n",trim($sDescription)); + + // 3) Avoid empty lines + for($i = 0; $i < sizeof($aDesc); $i++) + if(($sText = trim(strip_tags($aDesc[$i])))) + return $sText; + + return ''; } /* This allows us to pass on the current URL to the login form so that the user is returned