Make WordPress Core

Opened 12 years ago

Closed 11 years ago

#25394 closed defect (bug) (fixed)

On failure to upload theme, response parses "<",">" to "&lt;","&gt;"

Reported by: adriandakota's profile adrian.dakota Owned by: nacin's profile nacin
Milestone: 3.9 Priority: lowest
Severity: minor Version: 3.5.2
Component: Upgrade/Install Keywords: has-patch
Focuses: Cc:

Description

Using the theme upload tool, after uploading a non-valid theme. The HTML response reads:

Unpacking the package…

Installing the theme…

The package could not be installed. The theme is missing the <code>style.css</code> stylesheet.

Theme install failed.

The <code> is parsed and returned as

&lt;code&gt;style.css&lt;/code&gt;

I'm assuming it should be returning

<code>style.css</code>

as HTML, not as text.

Attachments (1)

25394.diff (2.1 KB) - added by JustinSainton 11 years ago.

Download all attachments as: .zip

Change History (6)

#1 @SergeyBiryukov
12 years ago

  • Component changed from General to Upgrade/Install
  • Severity changed from trivial to normal
  • Version changed from 3.6.1 to 3.5.2

@JustinSainton
11 years ago

#2 follow-up: @JustinSainton
11 years ago

  • Keywords has-patch added

Not sure of the best approach here, but it seems like a feasible one would be to simply remove the <code> tags. Patch attached with that approach.

#3 @nacin
11 years ago

  • Milestone changed from Awaiting Review to 3.9

#4 in reply to: ↑ 2 @samuelsidler
11 years ago

  • Priority changed from normal to lowest
  • Severity changed from normal to minor

Replying to JustinSainton:

Not sure of the best approach here, but it seems like a feasible one would be to simply remove the <code> tags. Patch attached with that approach.

In a number of places we add <span class="code"> instead of <code> tags. Note that line 1329 has those tags as well for a different error. Might be worth cleaning it up overall.

#5 @nacin
11 years ago

  • Owner set to nacin
  • Resolution set to fixed
  • Status changed from new to closed

In 27737:

Upgrader skins: Strip tags before displaying error data.

fixes #25394.

Note: See TracTickets for help on using tickets.