[DRE-maint] Bug#633305: redmine: Internal error on show user details page

Gregory Colpart reg at evolix.fr
Sat Jul 9 11:36:10 UTC 2011


Package: redmine
Version: 1.0.1-2
Severity: normal

Hello,

I use redmine package from Squeeze. When I click on user details
page (URI = http://www.example.com/users/4 for example), I have
an "Internal error" message. When I switch RailsEnv to "test",
I have more informations :

--8<-------------8<-----------8<----------
 Showing app/views/users/show.rhtml where line #11 raised:
undefined method `html_safe' for "foo at bar.com":String

/usr/lib/ruby/1.8/action_view/helpers/url_helper.rb:476:in `mail_to'
/usr/share/redmine/app/views/users/show.rhtml:11:in `_run_rhtml_app47views47users47show46rhtml'
/usr/share/redmine/app/controllers/users_controller.rb:68:in `show'
--8<-------------8<-----------8<----------

Problem seems to be with javascript encoding in mail_to() function.

I don't have a real patch, but I use a *workaround* :

--8<-------------8<-----------8<----------
--- show.rhtml.old      2011-07-08 21:25:50.000000000 +0200
+++ /usr/share/redmine/app/views/users/show.rhtml       2011-07-08 21:27:09.000000000 +0200
@@ -7,7 +7,7 @@
 <div class="splitcontentleft">
 <ul>
        <% unless @user.pref.hide_mail %>
-               <li><%=l(:field_mail)%>: <%= mail_to(h(@user.mail), nil, :encode => 'javascript') %></li>
+               <li><%=l(:field_mail)%>: <%= mail_to(h(@user.mail), nil, :encode => 'hex') %></li>
        <% end %>
        <% for custom_value in @custom_values %>
        <% if !custom_value.value.blank? %>
--8<-------------8<-----------8<----------

Note : I reproduce it with 1.0.1-1 too

Regards,
-- 
Gregory Colpart <reg at evolix.fr>  GnuPG:4096R/B8612B5D
Evolix - Informatique et Logiciels Libres http://www.evolix.fr/






More information about the Pkg-ruby-extras-maintainers mailing list