php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #50193 Backslashes from newline tokens in example scripts are stripped
Submitted: 2009-11-16 19:26 UTC Modified: 2010-01-07 07:03 UTC
From: sixd@php.net Assigned: yannick@php.net (profile)
Status: Closed Package: Online Doc Editor problem
PHP Version: Irrelevant OS: n/a
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: sixd@php.net
New email:
PHP Version: OS:

 

 [2009-11-16 19:26 UTC] sixd@php.net
Description:
------------
With the Online Editor, a diff is showing that any backslash used for "\n" in example strings is stripped.  Philip reports that a ".new" on disk has the backslashes missing. However, the file in the tab shows the backslashes.  

Actual result:
--------------
68	68	oci_execute($statement);
69	69	
70	 	echo "<table border='1'>\n";
 	70	echo "<table border='1'>n";
71	71	while ($row = oci_fetch_array($statement, OCI_ASSOC+OCI_RETURN_NULLS)) {
72	 	    echo "<tr>\n";
 	72	    echo "<tr>n";
73	73	    foreach ($row as $item) {
74	 	        echo "    <td>".($item!==null?htmlentities($item, ENT_QUOTES):" ")."</td>\n";
 	74	        echo "    <td>".($item!==null?htmlentities($item, ENT_QUOTES):"")."</td>n";
75	75	    }
76	 	    echo "</tr>\n";
 	76	    echo "</tr>n";
77	77	}
78	 	echo "</table>\n";
 	78	echo "</table>n";
79	79	


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-11-30 00:19 UTC] yannick@php.net
Hi,

Could you please give me witch file your example is from ?
 [2009-11-30 07:35 UTC] philip@php.net
Any file with \n in the examples, which might be:

echo "FOO\n";

I think this bug report was via the oci_execute() docs. It created a 
file named oci-execute.xml.new with stripped "\n" as "n" so that the 
above turns to:

echo "FOOn";

The diff within the editor itself also shows the stripped versions. 
 [2009-11-30 11:28 UTC] yannick@php.net
I just try with oci_fetch_all witch contains some "\n" in example & in diff panel.

I have modify this file and the result (.new file) contains always "\n". No problem with the diff too...

Philip, could you try to update the online version with the SVN one to see if this bug haven't been solve with it ?
 [2009-11-30 15:34 UTC] philip@php.net
It updates via cron three times daily, so, is up to date. At some point 
we can wipe it clean and go through the install process from scratch, if 
you feel this might help. It should be okay since it's only really been 
used for testing thus far.
 [2009-11-30 16:59 UTC] yannick@php.net
Philip,

I will try to studies this bug directly into the online version in the first time
 [2009-12-15 10:33 UTC] yannick@php.net
I just arrived to reproduce this problem, but only on the Online Demo (my dev. version don't produce it).

Just logging into the Online version, select the french documentation and view the diff of the file : fr/language/operators.xml in the "Pending Commit" grid.

Philip, can you tell me witch Php version is running under the server witch run the Online demo ? And can you tell me the configuration of the magic quotes ?
 [2009-12-16 22:48 UTC] svn@php.net
Automatic comment from SVN on behalf of yannick
Revision: http://svn.php.net/viewvc/?view=revision&revision=292225
Log: Fix bug #50193 & Review all check build system. You need to upgrade the database structure with this commit
 [2009-12-16 22:53 UTC] yannick@php.net
This bug has been fixed in SVN, and should show up online in an
hour or three.

Thank you for the report, and for helping us make PHP.net better.


 [2009-12-16 23:00 UTC] philip@php.net
PHP 5.3.1RC1 and all MQ settings are off.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Jul 20 06:01:29 2024 UTC