Merge pull request #2284 from jaimeiniesta/patch-1
escape gravatar URLs to comply with W3C standards
This commit is contained in:
commit
a6b88d1e7e
|
@ -335,7 +335,7 @@ class User < ActiveRecord::Base
|
|||
|
||||
def self.gravatar_template(email)
|
||||
email_hash = self.email_hash(email)
|
||||
"//www.gravatar.com/avatar/#{email_hash}.png?s={size}&r=pg&d=identicon"
|
||||
"//www.gravatar.com/avatar/#{email_hash}.png?s={size}&r=pg&d=identicon"
|
||||
end
|
||||
|
||||
# Don't pass this up to the client - it's meant for server side use
|
||||
|
|
|
@ -969,7 +969,7 @@ describe User do
|
|||
describe "#gravatar_template" do
|
||||
|
||||
it "returns a gravatar based template" do
|
||||
User.gravatar_template("em@il.com").should == "//www.gravatar.com/avatar/6dc2fde946483a1d8a84b89345a1b638.png?s={size}&r=pg&d=identicon"
|
||||
User.gravatar_template("em@il.com").should == "//www.gravatar.com/avatar/6dc2fde946483a1d8a84b89345a1b638.png?s={size}&r=pg&d=identicon"
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue