mdeering / gravatar_image_tag

A configurable and documented Rails view helper for adding gravatars into your Rails application
MIT License
367 stars 67 forks source link

Invalid HTML #27

Open mattherick opened 9 years ago

mattherick commented 9 years ago

Hi!

This

def self.url_params(gravatar_params)
  return nil if gravatar_params.keys.size == 0
  array = gravatar_params.map { |k, v| "#{k}=#{value_cleaner(v)}" }
  "?#{array.join('&')}"
end

causes invalid html, if I run the http://validator.w3.org

Line 93, Column 122: & did not start a character reference. (& probably should have been escaped as &.)…e66872a973005f1dae67?default=identicon&secure=true&size=50" width="50" height=…
Line 93, Column 134: & did not start a character reference. (& probably should have been escaped as &.)…a973005f1dae67?default=identicon&secure=true&size=50" width="50" height="50" />

Changing the "&" to "&' would fix it..

Can you fix this, or should i provide a pull request?

I know it is just a little "error", but if all other validations pass it would be fine if also this last one pass :-)..

Matthias

veye commented 9 years ago

Same here.

reiz commented 9 years ago

+1

veye commented 9 years ago

+1