php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21121 < br > in notes
Submitted: 2002-12-20 17:14 UTC Modified: 2003-01-02 20:40 UTC
Votes:2
Avg. Score:4.0 ± 1.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: sebastian dot haller at freesurf dot ch Assigned:
Status: Wont fix Package: Website problem
PHP Version: 4.3.0RC3 OS: Win98
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: sebastian dot haller at freesurf dot ch
New email:
PHP Version: OS:

 

 [2002-12-20 17:14 UTC] sebastian dot haller at freesurf dot ch
I can't write < br > (without spaces) in notes. It's always replaces by a 'new line'.

See for example
http://www.php.net/manual/de/function.nl2br.php (trevor at verite dot com / php at fendforyourself dot com)
or http://www.php.net/manual/de/function.htmlspecialchars.php
(the last comment 20 dec 2002, note in end)

PS: <br \> seems to work properly

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-12-29 09:25 UTC] hugo at gewis dot nl
Try writing &amp;lt;br&amp;gt; - I guess the form-input isn't changed, which means this shows up as literal text in HTML - in which that particular string has meaning and is interpreted by most browsers.

Hugo.
 [2002-12-29 09:25 UTC] hugo at gewis dot nl
Grmbl.
I counted on these tags also being expanded - they weren't.

Try &lt;br&gt;

Hugo.
 [2002-12-30 07:34 UTC] sebastian dot haller at freesurf dot ch
Here is where the problem occurs:
http://www.php.net/source.php?url=/include/layout.inc

/* this 'fixing' code will go away eventually. */
$fixes = array('<br>','<p>','</p>');
reset($fixes);
while (list(,$f)=each($fixes)) {
    $text=str_replace(htmlspecialchars($f), $f, $text);
    $text=str_replace(htmlspecialchars(strtoupper($f)), $f, $text);
}
 [2003-01-02 20:40 UTC] nicos@php.net
Thats a good reason to use <br />. We can't fix that anyway.

Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 10:01:30 2024 UTC