php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #2904 nl2br malfunction
Submitted: 1999-12-03 10:16 UTC Modified: 1999-12-03 22:02 UTC
From: nicolai at dailyrush dot dk Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0 Beta 3 OS: FreeBSD3.1
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: nicolai at dailyrush dot dk
New email:
PHP Version: OS:

 

 [1999-12-03 10:16 UTC] nicolai at dailyrush dot dk
The nl2br function doens't work correctly.

It seems it mistreats the _'_ sign

ex: 

$text = "It's not working";
$string = nl2br($text);

result: 

$string = 'It\'s not working";

Same problem with

$string = ereg_replace("\n","<BR>",$text);

Running FreeBSD3.1, Apache 1.3.9, PHP4b3, with-mysql, with-imap.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-12-03 22:02 UTC] rasmus at cvs dot php dot net
I can't duplicate this.  I am sure you are passing this from one page to another with escape_magic_quotes enabled.

 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Tue Oct 13 07:00:01 2026 UTC