Changeset 14915
- Timestamp:
- 05/25/2026 03:49:18 AM (3 months ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/plugins
- Files:
-
- 6 edited
-
plugin-directory/class-template.php (modified) (1 diff)
-
plugin-directory/widgets/class-committers.php (modified) (2 diffs)
-
plugin-directory/widgets/class-contributors.php (modified) (2 diffs)
-
plugin-directory/widgets/class-support-reps.php (modified) (2 diffs)
-
wporg-gp-routes/inc/routes/class-locale.php (modified) (3 diffs)
-
wporg-gp-routes/inc/routes/class-wp-directory.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-template.php
r14746 r14915 911 911 912 912 return $out; 913 }914 915 /**916 * Properly encodes a string to UTF-8.917 *918 * @static919 *920 * @param string $string921 * @return string922 */923 public static function encode( $string ) {924 $string = mb_convert_encoding( $string, 'UTF-8', 'ASCII, JIS, UTF-8, Windows-1252, ISO-8859-1' );925 926 return ent2ncr( htmlspecialchars_decode( htmlentities( $string, ENT_NOQUOTES, 'UTF-8' ), ENT_NOQUOTES ) );927 913 } 928 914 -
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/widgets/class-committers.php
r13633 r14915 2 2 namespace WordPressdotorg\Plugin_Directory\Widgets; 3 3 4 use WordPressdotorg\Plugin_Directory\Template;5 4 use WordPressdotorg\Plugin_Directory\Tools; 6 5 … … 57 56 <?php echo get_avatar( $committer->ID, 32 ); ?> 58 57 <a href="<?php echo esc_url( "https://profiles.wordpress.org/{$committer->user_nicename}/" ); ?>"> 59 <?php echo Template::encode( $committer->display_name ?: $committer->user_nicename ); ?>58 <?php echo $committer->display_name ?: $committer->user_nicename; ?> 60 59 </a><br> 61 60 -
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/widgets/class-contributors.php
r14396 r14915 1 1 <?php 2 2 namespace WordPressdotorg\Plugin_Directory\Widgets; 3 4 use WordPressdotorg\Plugin_Directory\Template;5 3 6 4 /** … … 74 72 <?php echo get_avatar( $contributor->ID, 32 ); ?> 75 73 <a href="<?php echo esc_url( "https://profiles.wordpress.org/{$contributor->user_nicename}/" ); ?>"> 76 <?php echo Template::encode( $contributor->display_name ?: $contributor->user_nicename ); ?>74 <?php echo $contributor->display_name ?: $contributor->user_nicename; ?> 77 75 </a> 78 76 </li> -
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/widgets/class-support-reps.php
r14363 r14915 2 2 namespace WordPressdotorg\Plugin_Directory\Widgets; 3 3 4 use WordPressdotorg\Plugin_Directory\Template;5 4 use WordPressdotorg\Plugin_Directory\Tools; 6 5 … … 61 60 <?php echo get_avatar( $support_rep->ID, 32 ); ?> 62 61 <a href="<?php echo esc_url( "https://profiles.wordpress.org/{$support_rep->user_nicename}/" ); ?>"> 63 <?php echo Template::encode( $support_rep->display_name ?: $support_rep->user_nicename ); ?>62 <?php echo $support_rep->display_name ?: $support_rep->user_nicename; ?> 64 63 </a><br> 65 64 -
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-routes/inc/routes/class-locale.php
r14911 r14915 435 435 $locale_contributors['editors'][ $editor_source ][ $editor_id ] = (object) array( 436 436 'nicename' => $user->user_nicename, 437 'display_name' => $ this->_encode( $user->display_name ),437 'display_name' => $user->display_name ?: $user->user_nicename, 438 438 'email' => $user->user_email, 439 439 ); … … 525 525 'login' => $user->user_login, 526 526 'nicename' => $user->user_nicename, 527 'display_name' => $ this->_encode( $user->display_name ),527 'display_name' => $user->display_name ?: $user->user_nicename, 528 528 'email' => $user->user_email, 529 529 'last_update' => $contributor->last_update, … … 1020 1020 " ); 1021 1021 } 1022 1023 private function _encode( $raw ) {1024 if ( 'UTF-8' !== mb_detect_encoding( $raw, 'UTF-8', true ) ) {1025 $raw = mb_convert_encoding( $raw, 'UTF-8', 'ASCII, JIS, Windows-1252, ISO-8859-1' );1026 }1027 return ent2ncr( htmlspecialchars_decode( htmlentities( $raw, ENT_NOQUOTES, 'UTF-8' ), ENT_NOQUOTES ) );1028 }1029 1022 } -
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-routes/inc/routes/class-wp-directory.php
r13605 r14915 45 45 $contributors_by_locale[ $translation_editor->locale ]['editors'][ $translation_editor->user_id ] = (object) array( 46 46 'nicename' => $user->user_nicename, 47 'display_name' => $ this->_encode( $user->display_name ),47 'display_name' => $user->display_name ?: $user->user_nicename, 48 48 ); 49 49 … … 73 73 $contributors_by_locale[ $row->locale ]['contributors'][ $row->user_id ] = (object) array( 74 74 'nicename' => $user->user_nicename, 75 'display_name' => $ this->_encode( $user->display_name ),75 'display_name' => $user->display_name ?: $user->user_nicename, 76 76 ); 77 77 … … 106 106 $contributors_by_locale[ $row->locale ]['contributors'][ $row->user_id ] = (object) array( 107 107 'nicename' => $user->user_nicename, 108 'display_name' => $ this->_encode( $user->display_name ),108 'display_name' => $user->display_name ?: $user->user_nicename, 109 109 ); 110 110 … … 241 241 return $wpdb->get_results( $sql ); 242 242 } 243 244 private function _encode( $raw ) {245 $raw = mb_convert_encoding( $raw, 'UTF-8', 'ASCII, JIS, UTF-8, Windows-1252, ISO-8859-1' );246 return ent2ncr( htmlspecialchars_decode( htmlentities( $raw, ENT_NOQUOTES, 'UTF-8' ), ENT_NOQUOTES ) );247 }248 243 }
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)