Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

remove leading and trailing whitespace,downcase email #8

Closed
wants to merge 1 commit into from

2 participants

@mdeering
Owner

Sorry for letting this sit so long.

Can you add a spec for this behaviour change? If not I will mark it as a TODO and do it with the next release.

@mdeering
Owner

Added normalization of the email to release 1.1.2

@mdeering mdeering closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/gravatar_image_tag.rb
View
2  lib/gravatar_image_tag.rb
@@ -84,7 +84,7 @@ def self.gravatar_url_base(secure = false)
end
def self.gravatar_id(email, filetype = nil)
- "#{ Digest::MD5.hexdigest(email) }#{ ".#{filetype}" unless filetype.nil? }" unless email.nil?
+ "#{ Digest::MD5.hexdigest(email.strip.downcase) }#{ ".#{filetype}" unless filetype.nil? }" unless email.nil?
end
def self.url_params(gravatar_params)
Something went wrong with that request. Please try again.