Rails 3 and devise escaping mailer templates -
i'm using rails 3 , devise authentication.
translating mailer templates devise default results in html escaping. particular consequence of confirmation of new account email includes invalid confirmation token.
<p><a href=3d"http://localhost:3000/users/confirmation?confirmation_token= =3d88uo7jetcetc">confirma= r mi cuenta</a></p>
the preceding 3d html escaping , should not there. using raw , html_safe has no consequence on output.
ok if comes across this, here's how solved it.
if mailer template included non english characters, whole template escaped. there doesn't seem way work around other escape such characters before rails does.
eg:
%p = "!bienvenido, #{username}!" %p usted puede confirmar su cuenta través del siguiente enlace: %p = link_to 'confirmar mi cuenta', confirmation_url(@resource, :confirmation_token => @resource.confirmation_token.html_safe)
needs be
%p = "¡bienvenido, #{username}!" %p usted puede confirmar su cuenta través del siguiente enlace: %p = link_to 'confirmar mi cuenta', confirmation_url(@resource, :confirmation_token => @resource.confirmation_token.html_safe)
Comments
Post a Comment