diff --git a/co-authors-plus.php b/co-authors-plus.php index 4815ac9d..2dc0d668 100755 --- a/co-authors-plus.php +++ b/co-authors-plus.php @@ -1205,8 +1205,17 @@ public function ajax_suggest() { } foreach ( $authors as $author ) { - $avatar_url = get_avatar_url( $author->ID ); - echo esc_html( $author->ID . ' | ' . $author->user_login . ' | ' . $author->display_name . ' | ' . $author->user_email . ' | ' . rawurldecode( $author->user_nicename ) ) . ' | ' . esc_url( $avatar_url ) . "\n"; + printf( + "%s ∣ %s ∣ %s ∣ %s ∣ %s ∣ %s \n", + esc_html( $author->ID ), + esc_html( $author->user_login ), + // Ensure that author names can contain a pipe character by replacing the pipe character with the + // divides character, which will now serve as a delimiter of the author parameters. (#370) + esc_html( str_replace( '∣', '|', $author->display_name ) ), + esc_html( $author->user_email ), + esc_html( rawurldecode( $author->user_nicename ) ), + esc_url( get_avatar_url( $author->ID ) ) + ); } die(); @@ -1376,7 +1385,7 @@ public function js_vars() { ?>