(fix) imprived the gravatar directive to extract email address between < >

feature/saveSortContacts
Ludovic Marcotte 2015-08-06 16:18:10 -04:00
parent 33d0f30d97
commit b5ca697b43
1 changed files with 7 additions and 1 deletions

View File

@ -12,10 +12,16 @@
*/
function Gravatar() {
return function(email, size) {
var hash, s = size;
var x, y, hash, s = size;
if (!email) {
return '';
}
x = email.indexOf('<');
if (x >= 0) {
y = email.indexOf('>', x);
if (y > x)
email = email.substring(x+1,y);
}
if (!size) {
s = 48; // default to 48 pixels
}