view_mail.js: fixed handling of references field