note 5345 deleted from nl2br by zak
| From: | zak@php.net | Date: | Sat, 30 Dec 2000 00:09:06 +0000 |
| Subject: | note 5345 deleted from nl2br by zak | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-9229@lists.php.net to get a copy of this message | ||
The black box (its because windows doens't have a font character to display the r) and rn are
windows'isms. To windows a linefeed(n) doesn't mean anything by itself, and it needs a
carriage return (r) for the newline to be valid. That is why a CrLf (carriage return linefeed) is
required (rn) in windows, and not in unix. The black box you see is because php's nl2br is
stripping the n but not the r. I guess the only solution in windows is not use nl2br and use
<PRE>$value = str_replace("\r\n","<BR>",$value);
</PRE>