Making WordPress.org

Changeset 3008


Ignore:
Timestamp:
04/26/2016 07:29:01 AM (9 years ago)
Author:
dd32
Message:

Plugin Directory: Tighten up the regular expression when parsing assets to avoid notices where unrecognised assets may be matched (for example, an error using a unicode cross rather than x in a banner filename).

See #1584

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/cli/class-import.php

    r2994 r3008  
    177177            foreach ( $svn_assets_folder as $asset ) {
    178178                // screenshot-0.(png|jpg|jpeg|gif)  ||  icon.svg
    179                 if ( ! preg_match( '!^(?P<type>screenshot|banner|icon)(-(?P<resolution>[^\s]+)\.(png|jpg|jpeg|gif)|\.svg)$!i', $asset['filename'], $m ) ) {
     179                if ( ! preg_match( '!^(?P<type>screenshot|banner|icon)(-(?P<resolution>[\dx]+)\.(png|jpg|jpeg|gif)|\.svg)$!i', $asset['filename'], $m ) ) {
    180180                    continue;
    181181                }
Note: See TracChangeset for help on using the changeset viewer.