(fix) imprived the gravatar directive to extract email address between < >
This commit is contained in:
parent
33d0f30d97
commit
b5ca697b43
|
@ -12,10 +12,16 @@
|
||||||
*/
|
*/
|
||||||
function Gravatar() {
|
function Gravatar() {
|
||||||
return function(email, size) {
|
return function(email, size) {
|
||||||
var hash, s = size;
|
var x, y, hash, s = size;
|
||||||
if (!email) {
|
if (!email) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
x = email.indexOf('<');
|
||||||
|
if (x >= 0) {
|
||||||
|
y = email.indexOf('>', x);
|
||||||
|
if (y > x)
|
||||||
|
email = email.substring(x+1,y);
|
||||||
|
}
|
||||||
if (!size) {
|
if (!size) {
|
||||||
s = 48; // default to 48 pixels
|
s = 48; // default to 48 pixels
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue