woods/gravatar-plugin

Doesn't output HTML Code

Closed this issue · 3 comments

wuwx commented

when i use this plugin, view code like this:

<%= gravatar_for @user %>

html has been escaped .....

i'm using rails 3.1.3

Are you referring to the ampersand in the middle of the source URL being escaped with &amp;?

<img class="gravatar" alt="" width="50" height="50" src="http://www.gravatar.com/avatar/f5dfb241dbb07b9709e0c44e08318a98?rating=PG&amp;size=50" />

That would be correct escaping:

http://htmlhelp.com/tools/validator/problems.html#amp

Let me know if it's some other problem.

Ahh, actually, I bet it's because rails 3 is automatically escaping all the HTML.

Try this instead and see if it fixes the problem temporarily:

<%= raw gravatar_for @user %>
wuwx commented

oh, yeah, i use <%= raw gravatar_for @user %>, then rails work OK now
thank you