Make WordPress Core

Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#10903 closed defect (bug) (worksforme)

Plugin editor removes valid backslashes

Reported by: takayukister's profile takayukister Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.9
Component: Administration Keywords:
Focuses: Cc:

Description

After updating a file in the "Plugins" > "Editor" menu, all backslashes in the source file disappear. For example, a "\n" will be replaced with just a "n" and newlines have no meaning. I tested this on the latest trunk revision 11995.

Change History (8)

#1 @dd32
15 years ago

  • Keywords needs-patch added
  • Milestone changed from Unassigned to 2.9

closed #10903 as duplicate of this:

When you edit a plugin, all backslashes are removed by line 46 of wp-admin/plugin-editor.php. This breaks many plugins - particuarly those which use a backslash as an escape character in text strings.

#2 @dd32
15 years ago

closed #10903 as duplicate of this:

..Yep, Closed this ticket as a duplicate of itself...

I meant #10924

#3 @dwright
15 years ago

  • Cc david_v_wright@… added

I cannot reproduce this in 2.9 revision 12155

I am using firefox (3.5) on linux, database is localhost, utf8

performed steps:

  • chmod 777 wp-content/plugins/hello.php
  • Plugins -> Editor -> Editing hello.php

added:

test \n\n\n

$var = "\n";


  • diff with original file

$ diff -Naur -w wp-content/plugins/hello.php.orig wp-content/plugins/hello.php

--- wp-content/plugins/hello.php.orig	2009-11-07 13:34:18.000000000 -0800
+++ wp-content/plugins/hello.php	2009-11-07 13:38:03.000000000 -0800
@@ -12,6 +12,8 @@
 Version: 1.5.1
 Author URI: http://ma.tt/
 */
+// test \n\n\n 
+$var = "\n";


Please give steps for how to recreate this bug

#4 @dd32
15 years ago

  • Keywords reporter-feedback added; needs-patch removed
  • Milestone changed from 2.9 to 3.0

I cant duplicate it with various configurations of magic quotes either.

Given that all $_POST data is slashed by WP in wp-settings.php, There should be no reason that the data has been messed with at a later stage, Unless theres a plugin involved..

If the OP could report back steps and the server configuration which this affects, that'd be good.

Milestone: 3.0 pending patch and/or ability to duplicate the issue.

#5 @takayukister
15 years ago

I tested again with the latest revision, and this time the trouble of removing backslashes didn't occur. It's working correctly. It might be that I was having wrong configuration with something on my last testing.

#6 @dwright
15 years ago

  • Resolution set to worksforme
  • Status changed from new to closed

I see that in #10924 it states this was an issue for 2.8.4.
(not sure if that should be a dup of this tic or not)

since we cant reproduce, I'm resolving this ticket.

#7 @dwright
15 years ago

  • Keywords reporter-feedback removed

#8 @mtekk
15 years ago

  • Milestone 3.0 deleted
Note: See TracTickets for help on using tickets.