Drupal user profile image alt text is showing special characters Drupal user profile image alt text is showing special characters instead of a quote in the user name. My user name is Derek O'Rourke  and the alt text for user profile image is showing Derek O&amp;#039;Rourke's picture"which is not correct.

I couldn't find a way to update it. Please help me.
Assuming Drupal 7, in the template.php of your theme, add this function:

function themename_preprocess_user_picture(&amp;$variables) {
  $variables['user_picture'] = htmlspecialchars_decode($variables['user_picture'], ENT_QUOTES);
}


The problem arises from the template_preprocess_user_picture() function in user.module. It passes the alt text through the t function, which in turn calls htmlspecialchars() and it is here the apostrophe is encoded as &amp;#039;

In your theme function, the HTML code of the user picture tag will be available in $variables['user_picture']. Passing the HTML code through htmlspecialchars_decode() will convert &amp;#039; back to an apostrophe.