In Drupal 8, long comment author names are truncated. These comments are from anonymous users. When I use the following preprocess function, Drupal responds with a HTTP 500 code, and I have to restore the site from backup.
function THEME_preprocess_username(&$vars) {
$vars['name'] = check_plain($vars['name_raw']);
}
Is there another way of removing the truncation from author names in comments?