WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#30133 closed defect (bug) (fixed)

Twenty Fifteen: minor file cleanup

Reported by: lancewillett Owned by:
Milestone: 4.1 Priority: normal
Severity: normal Version:
Component: Bundled Theme Keywords: has-patch
Focuses: Cc:

Description

Looking at things like removing trailing whitespace, SVN executable, SVN properties, EOL consistency in newlines.

Attachments (4)

30133-whitespace.diff (7.0 KB) - added by lancewillett 6 years ago.
30133-svn-props.diff (31.1 KB) - added by lancewillett 6 years ago.
30133-spacing-cleanup.diff (2.1 KB) - added by lancewillett 6 years ago.
30133-escaping.diff (1.5 KB) - added by lancewillett 6 years ago.

Download all attachments as: .zip

Change History (18)

#1 @lancewillett
6 years ago

Should crush all PNG image files also.

This ticket was mentioned in Slack in #core-themes by lancewillett. View the logs.


6 years ago

#3 @lancewillett
6 years ago

In 30043:

Twenty Fifteen: squeeze a few more bytes from screenshot PNG file. See #30133.

#4 follow-up: @lancewillett
6 years ago

In 30044:

Twenty Fifteen: escape variable in HTML attribute output in customer header. See #30133.

#5 @lancewillett
6 years ago

In 30045:

Twenty Fifteen: spacing and code style cleanup. See #30133.

#6 @lancewillett
6 years ago

In 30046:

Twenty Fifteen: consistent line endings and SVN properties on all files. See #30133.

#7 @lancewillett
6 years ago

In 30047:

Twenty Fifteen: pinking shears. See #30133.

#8 @lancewillett
6 years ago

In 30048:

Twenty Fifteen: minor code style for variable within array notation. See #30133.

#9 @lancewillett
6 years ago

In 30049:

Twenty Fifteen: minor CSS spacing fix. See #30133.

#10 @lancewillett
6 years ago

In 30051:

Twenty Fifteen: minor CSS fixes. See #30133.

#11 in reply to: ↑ 4 @ocean90
6 years ago

Replying to lancewillett:

In 30044:

Twenty Fifteen: escape variable in HTML attribute output in customer header. See #30133.

esc_attr() is just for attributes, because it escapes the quotes.

var_dump(' style="color: #fff;"' === esc_attr( ' style="color: #fff;"') ); // false
var_dump(' style="color: #fff;"' === ' style="' . esc_attr( 'color: #fff;') . '"' ); // true

So in line 152 sprintf( ' style="color: #%s;"', esc_attr( get_header_textcolor() ) ); should be fine.

#12 @lancewillett
6 years ago

In 30081:

Twenty Fifteen: only escape HTML attribute output with esc_attr(). See #30133, props ocean90.

#13 @lancewillett
6 years ago

Thanks for the catch, ocean90. :)

#14 @lancewillett
6 years ago

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

Can open new tickets for new issues in cleanup.

Note: See TracTickets for help on using tickets.