Make WordPress Core

Opened 15 years ago

Closed 15 years ago

#9619 closed defect (bug) (duplicate)

RegExp pattern bug in preview_theme function

Reported by: wpusorg's profile wpus.org Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.7.1
Component: Themes Keywords:
Focuses: Cc:

Description

The theme can't be previewed if the theme path include '-' letter.
Because preview_theme function will remove the dash letter. Please refer lines 852 and 860 in theme.php file.

The current regular expression pattern:

'|[^a-z0-9_.-/]|i'

To fix it, just add one back slash before the last dash. Use the following pattern:

'|[^a-z0-9_.\-/]|i'

Change History (1)

#1 @ryan
15 years ago

  • Milestone Unassigned deleted
  • Resolution set to duplicate
  • Status changed from new to closed

See #9329

Note: See TracTickets for help on using tickets.