Opened 15 months ago

Closed 14 months ago

Last modified 14 months ago

#20090 closed defect (bug) (fixed)

Can't edit themes with '&' in the name

Reported by: trepmal Owned by: nacin
Priority: normal Milestone: 3.4
Component: Administration Version:
Severity: normal Keywords: needs-patch
Cc: kpayne@…

Description

If a theme has an ampersand in the name, it cannot be edited through the WordPress theme editor. I tested with a simple child theme:

/*
Theme Name: Amper & Sand
Template: twentyeleven
*/

(doesn't matter if the ampersand is encoded or not)

If that theme is chosen from the 'Select theme to edit' select box, you are presented with The requested theme does not exist. (via wp_die())

Or worse, if it is the active theme you can't even access the Theme Editor, as you are immediately presented with the same message.

Attachments (1)

theme-editor.diff (810 bytes) - added by trepmal 15 months ago.

Download all attachments as: .zip

Change History (7)

  • Cc kpayne@… added

I tested this. I can confirm the problem and the patch works.

  • Keywords needs-patch added; has-patch removed

Problem returned (see #20103). Patch no longer works. #blamenacin

  • Owner set to nacin
  • Status changed from new to accepted

The theme editor needs to be rewritten to use wp_get_themes() instead of get_themes(), which will change it from being keyed by theme name to by stylesheet. This will fix this.

Tested this without the patch on 3.4-beta1. Cannot reproduce. Looks like the wp_get_themes() rewrite fixed it.

  • Milestone changed from Awaiting Review to 3.4
  • Resolution set to fixed
  • Status changed from accepted to closed

Yes, this is definitely fixed.

Related/duplicate (slightly broader): #16507

Note: See TracTickets for help on using tickets.