Open GoogleCodeExporter opened 8 years ago
I am also having the same issue, please help!
Original comment by nerdyhe...@gmail.com
on 11 May 2009 at 9:02
Use this function:
function nl2brPre($input) {
$input = preg_replace('%\n%i','<br/>',$input);
preg_match_all('%<pre\s*[^>]*>.+?</pre>%i',$input,$a);
for($i=0;$i<sizeof($a);$i++){
$input = str_replace($a[$i],str_replace("<br/>","\n",$a[$i]),$input);
}
return $input;
}
Original comment by ziebe...@gmail.com
on 30 Aug 2009 at 12:28
Very helpful, thank you!
Original comment by leonli...@gmail.com
on 27 Aug 2010 at 4:44
Original issue reported on code.google.com by
gauluck...@gmail.com
on 21 Apr 2009 at 10:10