mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-03-27 17:12:43 +00:00
(fix) imprived the gravatar directive to extract email address between < >
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user