WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#9619 closed defect (bug) (duplicate)

RegExp pattern bug in preview_theme function

Reported by: 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)

comment:1 @ryan6 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.