Oops escape everything but image urls
This commit is contained in:
parent
908bba8c13
commit
4c7b0a42b5
|
@ -45,8 +45,9 @@ module ApplicationHelper
|
|||
result << tag(:meta, property: 'twitter:card', content: "summary")
|
||||
[:image, :url, :title, :description].each do |property|
|
||||
if opts[property].present?
|
||||
result << tag(:meta, {property: "og:#{property}", content: opts[property]}, nil, false) << "\n"
|
||||
result << tag(:meta, {property: "twitter:#{property}", content: opts[property]}, nil, false) << "\n"
|
||||
escape = (property != :image)
|
||||
result << tag(:meta, {property: "og:#{property}", content: opts[property]}, nil, escape) << "\n"
|
||||
result << tag(:meta, {property: "twitter:#{property}", content: opts[property]}, nil, escape) << "\n"
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -322,7 +322,7 @@ class User < ActiveRecord::Base
|
|||
|
||||
# Don't pass this up to the client - it's meant for server side use
|
||||
def small_avatar_url
|
||||
"https://www.gravatar.com/avatar/#{email_hash}.png?s=50&r=pg&d=identicon"
|
||||
"https://www.gravatar.com/avatar/#{email_hash}.png?s=200&r=pg&d=identicon"
|
||||
end
|
||||
|
||||
# return null for local avatars, a template for gravatar
|
||||
|
|
Loading…
Reference in New Issue