Making WordPress.org


Ignore:
Timestamp:
05/24/2015 04:22:57 AM (10 years ago)
Author:
obenland
Message:

WP.org Themes: Strip non-UTF8 characters to avoid confusing Trac.

Themes with non-UTF8 characters in their descriptions can cause the Tracbot to
truncate the ticket description.

See https://themes.trac.wordpress.org/ticket/24705.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/theme-directory/class-wporg-themes-upload.php

    r1532 r1612  
    132132            return sprintf( __( 'Sorry, the theme name %s is reserved for use by WordPress Core. Please change the name of your theme in <code>style.css</code> and upload it again.', 'wporg-themes' ), '<code>' . $this->theme_slug . '</code>' );
    133133        }
    134    
     134
    135135        // populate the theme post and author
    136136        $this->theme_post = $this->get_theme_post();
     
    454454        }
    455455
     456        // Description
     457        $theme_description = $this->strip_non_utf8( (string) $this->theme->display( 'Description' ) );
     458
    456459        // Hacky way to prevent a problem with xml-rpc.
    457460        $this->trac_ticket->description = <<<TICKET
    458461{$this->theme->display( 'Name' )} - {$this->theme->display( 'Version' )}
    459462
    460 {$this->theme->display( 'Description' )}
     463{$theme_description}
    461464
    462465Theme URL - {$this->theme->display( 'ThemeURI' )}
Note: See TracChangeset for help on using the changeset viewer.