Commit f5e7969587a05bf06b4a4d8e12df698d6283e57a
1 parent
26c8903c
Exists in
profile_api_improvements
and in
1 other branch
fix wrong html parser
Showing
25 changed files
with
59 additions
and
59 deletions
Show diff stats
app/api/helpers.rb
@@ -302,12 +302,12 @@ module Api | @@ -302,12 +302,12 @@ module Api | ||
302 | end | 302 | end |
303 | 303 | ||
304 | def cant_be_saved_request!(attribute) | 304 | def cant_be_saved_request!(attribute) |
305 | - message = _("(Invalid request) %s can't be saved") % attribute | 305 | + message = _("(Invalid request) %s can't be saved").html_safe % attribute |
306 | render_api_error!(message, 400) | 306 | render_api_error!(message, 400) |
307 | end | 307 | end |
308 | 308 | ||
309 | def bad_request!(attribute) | 309 | def bad_request!(attribute) |
310 | - message = _("(Invalid request) %s not given") % attribute | 310 | + message = _("(Invalid request) %s not given").html_safe % attribute |
311 | render_api_error!(message, 400) | 311 | render_api_error!(message, 400) |
312 | end | 312 | end |
313 | 313 |
app/controllers/admin/categories_controller.rb
@@ -44,7 +44,7 @@ class CategoriesController < AdminController | @@ -44,7 +44,7 @@ class CategoriesController < AdminController | ||
44 | if request.post? | 44 | if request.post? |
45 | @category.update!(params[:category]) | 45 | @category.update!(params[:category]) |
46 | @saved = true | 46 | @saved = true |
47 | - session[:notice] = _("Category %s saved." % @category.name) | 47 | + session[:notice] = _("Category %s saved." % @category.name).html_safe |
48 | redirect_to :action => 'index' | 48 | redirect_to :action => 'index' |
49 | end | 49 | end |
50 | rescue Exception => e | 50 | rescue Exception => e |
app/controllers/box_organizer_controller.rb
@@ -109,7 +109,7 @@ class BoxOrganizerController < ApplicationController | @@ -109,7 +109,7 @@ class BoxOrganizerController < ApplicationController | ||
109 | def show_block_type_info | 109 | def show_block_type_info |
110 | type = params[:type] | 110 | type = params[:type] |
111 | if type.blank? || !available_blocks.map(&:name).include?(type) | 111 | if type.blank? || !available_blocks.map(&:name).include?(type) |
112 | - raise ArgumentError.new("Type %s is not allowed. Go away." % type) | 112 | + raise ArgumentError.new("Type %s is not allowed. Go away.".html_safe % type) |
113 | end | 113 | end |
114 | @block = type.constantize.new | 114 | @block = type.constantize.new |
115 | @block.box = Box.new(:owner => boxes_holder) | 115 | @block.box = Box.new(:owner => boxes_holder) |
@@ -122,7 +122,7 @@ class BoxOrganizerController < ApplicationController | @@ -122,7 +122,7 @@ class BoxOrganizerController < ApplicationController | ||
122 | 122 | ||
123 | def new_block(type, box) | 123 | def new_block(type, box) |
124 | if !available_blocks.map(&:name).include?(type) | 124 | if !available_blocks.map(&:name).include?(type) |
125 | - raise ArgumentError.new("Type %s is not allowed. Go away." % type) | 125 | + raise ArgumentError.new("Type %s is not allowed. Go away.".html_safe % type) |
126 | end | 126 | end |
127 | block = type.constantize.new | 127 | block = type.constantize.new |
128 | box.blocks << block | 128 | box.blocks << block |
app/controllers/public/account_controller.rb
@@ -205,7 +205,7 @@ class AccountController < ApplicationController | @@ -205,7 +205,7 @@ class AccountController < ApplicationController | ||
205 | if params[:value].blank? | 205 | if params[:value].blank? |
206 | @change_password.errors[:base] << _('Can not recover user password with blank value.') | 206 | @change_password.errors[:base] << _('Can not recover user password with blank value.') |
207 | else | 207 | else |
208 | - @change_password.errors[:base] << _('Could not find any user with %s equal to "%s".') % [fields_label, params[:value]] | 208 | + @change_password.errors[:base] << _('Could not find any user with %s equal to "%s".').html_safe % [fields_label, params[:value]] |
209 | end | 209 | end |
210 | rescue ActiveRecord::RecordInvalid | 210 | rescue ActiveRecord::RecordInvalid |
211 | @change_password.errors[:base] << _('Could not perform password recovery for the user.') | 211 | @change_password.errors[:base] << _('Could not perform password recovery for the user.') |
app/controllers/public/profile_controller.rb
@@ -42,8 +42,8 @@ class ProfileController < PublicController | @@ -42,8 +42,8 @@ class ProfileController < PublicController | ||
42 | feed_writer = FeedWriter.new | 42 | feed_writer = FeedWriter.new |
43 | data = feed_writer.write( | 43 | data = feed_writer.write( |
44 | tagged, | 44 | tagged, |
45 | - :title => _("%s's contents tagged with \"%s\"") % [profile.name, @tag], | ||
46 | - :description => _("%s's contents tagged with \"%s\"") % [profile.name, @tag], | 45 | + :title => _("%s's contents tagged with \"%s\"").html_safe % [profile.name, @tag], |
46 | + :description => _("%s's contents tagged with \"%s\"").html_safe % [profile.name, @tag], | ||
47 | :link => url_for(profile.url) | 47 | :link => url_for(profile.url) |
48 | ) | 48 | ) |
49 | render :text => data, :content_type => "text/xml" | 49 | render :text => data, :content_type => "text/xml" |
@@ -88,7 +88,7 @@ class ProfileController < PublicController | @@ -88,7 +88,7 @@ class ProfileController < PublicController | ||
88 | 88 | ||
89 | def join_modal | 89 | def join_modal |
90 | profile.add_member(user) | 90 | profile.add_member(user) |
91 | - session[:notice] = _('%s administrator still needs to accept you as member.') % profile.name | 91 | + session[:notice] = _('%s administrator still needs to accept you as member.').html_safe % profile.name |
92 | redirect_to :action => :index | 92 | redirect_to :action => :index |
93 | end | 93 | end |
94 | 94 | ||
@@ -98,12 +98,12 @@ class ProfileController < PublicController | @@ -98,12 +98,12 @@ class ProfileController < PublicController | ||
98 | 98 | ||
99 | profile.add_member(user) | 99 | profile.add_member(user) |
100 | if !profile.members.include?(user) | 100 | if !profile.members.include?(user) |
101 | - render :text => {:message => _('%s administrator still needs to accept you as member.') % profile.name}.to_json | 101 | + render :text => {:message => _('%s administrator still needs to accept you as member.').html_safe % profile.name}.to_json |
102 | else | 102 | else |
103 | - render :text => {:message => _('You just became a member of %s.') % profile.name}.to_json | 103 | + render :text => {:message => _('You just became a member of %s.').html_safe % profile.name}.to_json |
104 | end | 104 | end |
105 | else | 105 | else |
106 | - render :text => {:message => _('You are already a member of %s.') % profile.name}.to_json | 106 | + render :text => {:message => _('You are already a member of %s.').html_safe % profile.name}.to_json |
107 | end | 107 | end |
108 | end | 108 | end |
109 | 109 | ||
@@ -125,7 +125,7 @@ class ProfileController < PublicController | @@ -125,7 +125,7 @@ class ProfileController < PublicController | ||
125 | render :text => current_person.leave(profile, params[:reload]) | 125 | render :text => current_person.leave(profile, params[:reload]) |
126 | end | 126 | end |
127 | else | 127 | else |
128 | - render :text => {:message => _('You are not a member of %s.') % profile.name}.to_json | 128 | + render :text => {:message => _('You are not a member of %s.').html_safe % profile.name}.to_json |
129 | end | 129 | end |
130 | end | 130 | end |
131 | 131 | ||
@@ -145,9 +145,9 @@ class ProfileController < PublicController | @@ -145,9 +145,9 @@ class ProfileController < PublicController | ||
145 | # FIXME this shouldn't be in Person model? | 145 | # FIXME this shouldn't be in Person model? |
146 | if !user.memberships.include?(profile) | 146 | if !user.memberships.include?(profile) |
147 | AddFriend.create!(:person => user, :friend => profile) | 147 | AddFriend.create!(:person => user, :friend => profile) |
148 | - render :text => _('%s still needs to accept being your friend.') % profile.name | 148 | + render :text => _('%s still needs to accept being your friend.').html_safe % profile.name |
149 | else | 149 | else |
150 | - render :text => _('You are already a friend of %s.') % profile.name | 150 | + render :text => _('You are already a friend of %s.').html_safe % profile.name |
151 | end | 151 | end |
152 | end | 152 | end |
153 | 153 | ||
@@ -178,7 +178,7 @@ class ProfileController < PublicController | @@ -178,7 +178,7 @@ class ProfileController < PublicController | ||
178 | def unblock | 178 | def unblock |
179 | if current_user.person.is_admin?(profile.environment) | 179 | if current_user.person.is_admin?(profile.environment) |
180 | profile.unblock | 180 | profile.unblock |
181 | - session[:notice] = _("You have unblocked %s successfully. ") % profile.name | 181 | + session[:notice] = _("You have unblocked %s successfully. ").html_safe % profile.name |
182 | redirect_to :controller => 'profile', :action => 'index' | 182 | redirect_to :controller => 'profile', :action => 'index' |
183 | else | 183 | else |
184 | message = _('You are not allowed to unblock enterprises in this environment.') | 184 | message = _('You are not allowed to unblock enterprises in this environment.') |
app/mailers/contact.rb
@@ -47,7 +47,7 @@ class Contact | @@ -47,7 +47,7 @@ class Contact | ||
47 | content_type: 'text/html', | 47 | content_type: 'text/html', |
48 | to: contact.dest.notification_emails, | 48 | to: contact.dest.notification_emails, |
49 | reply_to: contact.email, | 49 | reply_to: contact.email, |
50 | - subject: "[#{contact.dest.short_name(30)}] #{contact.subject,}".html_safe, | 50 | + subject: "[#{contact.dest.short_name(30)}] #{contact.subject}".html_safe, |
51 | from: "#{contact.name} <#{contact.dest.environment.noreply_email}>".html_safe | 51 | from: "#{contact.name} <#{contact.dest.environment.noreply_email}>".html_safe |
52 | } | 52 | } |
53 | 53 |
app/models/abuse_complaint.rb
@@ -25,7 +25,7 @@ class AbuseComplaint < Task | @@ -25,7 +25,7 @@ class AbuseComplaint < Task | ||
25 | end | 25 | end |
26 | 26 | ||
27 | def title | 27 | def title |
28 | - abuse_reports.count > 1 ? (_('Abuse complaint (%s)') % abuse_reports.count) :_('Abuse complaint') | 28 | + abuse_reports.count > 1 ? (_('Abuse complaint (%s)').html_safe % abuse_reports.count) :_('Abuse complaint') |
29 | end | 29 | end |
30 | 30 | ||
31 | def linked_subject | 31 | def linked_subject |
@@ -57,15 +57,15 @@ class AbuseComplaint < Task | @@ -57,15 +57,15 @@ class AbuseComplaint < Task | ||
57 | end | 57 | end |
58 | 58 | ||
59 | def task_activated_message | 59 | def task_activated_message |
60 | - _('Your profile was reported by the users of %s due to inappropriate behavior. The administrators of the environment are now reviewing the report. To solve this misunderstanding, please contact the administrators.') % environment.name | 60 | + _('Your profile was reported by the users of %s due to inappropriate behavior. The administrators of the environment are now reviewing the report. To solve this misunderstanding, please contact the administrators.').html_safe % environment.name |
61 | end | 61 | end |
62 | 62 | ||
63 | def task_finished_message | 63 | def task_finished_message |
64 | - _('Your profile was disabled by the administrators of %s due to inappropriate behavior. To solve this misunderstanding please contact them.') % environment.name | 64 | + _('Your profile was disabled by the administrators of %s due to inappropriate behavior. To solve this misunderstanding please contact them.').html_safe % environment.name |
65 | end | 65 | end |
66 | 66 | ||
67 | def target_notification_description | 67 | def target_notification_description |
68 | - _('%s was reported due to inappropriate behavior.') % reported.name | 68 | + _('%s was reported due to inappropriate behavior.').html_safe % reported.name |
69 | end | 69 | end |
70 | 70 | ||
71 | def target_notification_message | 71 | def target_notification_message |
app/views/account/activation_question.html.erb
@@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
3 | var answer = parseInt(form.answer.value); | 3 | var answer = parseInt(form.answer.value); |
4 | var val = form.answer.value; | 4 | var val = form.answer.value; |
5 | if (!answer || (val.length != 4) || val > <%= Time.now.year %> || val < 1900) { | 5 | if (!answer || (val.length != 4) || val > <%= Time.now.year %> || val < 1900) { |
6 | - alert(<%= (_('The year must be between %d and %d') % [1900, Time.now.year]).inspect %>); | 6 | + alert(<%= (_('The year must be between %d and %d').html_safe % [1900, Time.now.year]).inspect %>); |
7 | return false; | 7 | return false; |
8 | } else { | 8 | } else { |
9 | return true; | 9 | return true; |
@@ -28,9 +28,9 @@ | @@ -28,9 +28,9 @@ | ||
28 | 28 | ||
29 | <p> <strong><%= _('Pay atention! You have only one chance!') %></strong> </p> | 29 | <p> <strong><%= _('Pay atention! You have only one chance!') %></strong> </p> |
30 | 30 | ||
31 | - <p><%= _("This is a question to know if you really are part of this enterprise. Pay atention because you have only one chance to answer right and activate your enterprise. If you answer wrong you will not be able to activate the enterprise automaticaly and must get in touch with the admins of %s by email or phone.") % environment.name %> </p> | 31 | + <p><%= _("This is a question to know if you really are part of this enterprise. Pay atention because you have only one chance to answer right and activate your enterprise. If you answer wrong you will not be able to activate the enterprise automaticaly and must get in touch with the admins of %s by email or phone.").html_safe % environment.name %> </p> |
32 | 32 | ||
33 | - <%= ApplicationHelper::NoosferoFormBuilder::output_field(@question == :foundation_year ? (_("What year your enterprise was founded? It must have 4 digits, eg 1990. %s") % environment.tip_message_enterprise_activation_question) : _('What is the CNPJ of your enterprise?'), text_field_tag(:answer, nil, :id => 'enterprise-activation-answer')) %> | 33 | + <%= ApplicationHelper::NoosferoFormBuilder::output_field(@question == :foundation_year ? (_("What year your enterprise was founded? It must have 4 digits, eg 1990. %s").html_safe % environment.tip_message_enterprise_activation_question) : _('What is the CNPJ of your enterprise?'), text_field_tag(:answer, nil, :id => 'enterprise-activation-answer')) %> |
34 | 34 | ||
35 | <%= hidden_field_tag :enterprise_code, params[:enterprise_code] %> | 35 | <%= hidden_field_tag :enterprise_code, params[:enterprise_code] %> |
36 | 36 |
app/views/admin_panel/_signup_welcome_text.html.erb
1 | <div class='description'> | 1 | <div class='description'> |
2 | <%= _('This text will be sent to new users if the feature "Send welcome e-mail to new users" is enabled on environment.') %><br/><br/> | 2 | <%= _('This text will be sent to new users if the feature "Send welcome e-mail to new users" is enabled on environment.') %><br/><br/> |
3 | - <%= _('Including %s on body, it will be replaced by the real name of the e-mail recipient.') % content_tag('code', '{user_name}') %> | 3 | + <%= _('Including %s on body, it will be replaced by the real name of the e-mail recipient.').html_safe % content_tag('code', '{user_name}') %> |
4 | </div> | 4 | </div> |
5 | 5 | ||
6 | <%= labelled_form_field(_('Subject'), text_field(:environment, :signup_welcome_text_subject, :style => 'width:100%')) %> | 6 | <%= labelled_form_field(_('Subject'), text_field(:environment, :signup_welcome_text_subject, :style => 'width:100%')) %> |
app/views/cms/_blog.html.erb
@@ -58,7 +58,7 @@ | @@ -58,7 +58,7 @@ | ||
58 | <div id="blog-image-builder"> | 58 | <div id="blog-image-builder"> |
59 | <%= f.fields_for :image_builder, @article.image do |i| %> | 59 | <%= f.fields_for :image_builder, @article.image do |i| %> |
60 | <%= file_field_or_thumbnail(_('Cover image:'), @article.image, i)%> | 60 | <%= file_field_or_thumbnail(_('Cover image:'), @article.image, i)%> |
61 | - <%= _("Max size: %s (.jpg, .gif, .png)")% Image.max_size.to_humanreadable %> | 61 | + <%= _("Max size: %s (.jpg, .gif, .png)").html_safe % Image.max_size.to_humanreadable %> |
62 | <% end %> | 62 | <% end %> |
63 | </div> | 63 | </div> |
64 | 64 |
app/views/enterprise_validation/view_processed.html.erb
1 | -<h2><%= _('Processed validation request for %s ') % @processed.name %> (<%= status(@processed) %>)</h2> | 1 | +<h2><%= _('Processed validation request for %s ').html_safe % @processed.name %> (<%= status(@processed) %>)</h2> |
2 | 2 | ||
3 | <%= link_to _('Back'), :action => 'index' %> | 3 | <%= link_to _('Back'), :action => 'index' %> |
4 | 4 |
app/views/favorite_enterprises/add.html.erb
1 | -<h1><%= _('Adding %s as a favorite enterprise') % @favorite_enterprise.name %></h1> | 1 | +<h1><%= _('Adding %s as a favorite enterprise').html_safe % @favorite_enterprise.name %></h1> |
2 | 2 | ||
3 | <p> | 3 | <p> |
4 | -<%= _('Are you sure you want to add %s as your favorite enterprise?') % @favorite_enterprise.name %> | 4 | +<%= _('Are you sure you want to add %s as your favorite enterprise?').html_safe % @favorite_enterprise.name %> |
5 | </p> | 5 | </p> |
6 | 6 | ||
7 | <%= form_tag do %> | 7 | <%= form_tag do %> |
8 | <%= hidden_field_tag(:confirmation, 1) %> | 8 | <%= hidden_field_tag(:confirmation, 1) %> |
9 | 9 | ||
10 | - <%= submit_button(:ok, _("Yes, I am sure"), :title => _("I want to add %s as a favorite enterprise") % @favorite_enterprise.name) %> | 10 | + <%= submit_button(:ok, _("Yes, I am sure"), :title => _("I want to add %s as a favorite enterprise").html_safe % @favorite_enterprise.name) %> |
11 | <%= button(:cancel, _("No, I don't want"), :action => 'index') %> | 11 | <%= button(:cancel, _("No, I don't want"), :action => 'index') %> |
12 | <% end %> | 12 | <% end %> |
app/views/friends/remove.html.erb
1 | <div id="remove_friend"> | 1 | <div id="remove_friend"> |
2 | 2 | ||
3 | -<h1><%= _('Removing friend: %s') % @friend.name %></h1> | 3 | +<h1><%= _('Removing friend: %s').html_safe % @friend.name %></h1> |
4 | 4 | ||
5 | <%= profile_image @friend, :thumb, :class => 'friend_picture' %> | 5 | <%= profile_image @friend, :thumb, :class => 'friend_picture' %> |
6 | 6 | ||
7 | <p> | 7 | <p> |
8 | -<%= _('Are you sure you want to remove %s from your friends list?') % @friend.name %> | 8 | +<%= _('Are you sure you want to remove %s from your friends list?').html_safe % @friend.name %> |
9 | </p> | 9 | </p> |
10 | 10 | ||
11 | <p> | 11 | <p> |
12 | <em> | 12 | <em> |
13 | -<%= _('Note that %s will still have you as a friend, unless he/she also wants to remove you from his/her friend list.') % @friend.name %> | 13 | +<%= _('Note that %s will still have you as a friend, unless he/she also wants to remove you from his/her friend list.').html_safe % @friend.name %> |
14 | </em> | 14 | </em> |
15 | </p> | 15 | </p> |
16 | 16 |
app/views/home/welcome.html.erb
1 | <% default_message = defined?(default_message) ? default_message : false %> | 1 | <% default_message = defined?(default_message) ? default_message : false %> |
2 | 2 | ||
3 | <div id='thanks-for-signing'> | 3 | <div id='thanks-for-signing'> |
4 | - <h1><%= _("Welcome to %s!") % environment.name %></h1> | 4 | + <h1><%= _("Welcome to %s!").html_safe % environment.name %></h1> |
5 | <% if environment.has_custom_welcome_screen? && !default_message %> | 5 | <% if environment.has_custom_welcome_screen? && !default_message %> |
6 | <%= environment.settings[:signup_welcome_screen_body].html_safe %> | 6 | <%= environment.settings[:signup_welcome_screen_body].html_safe %> |
7 | <% else %> | 7 | <% else %> |
@@ -17,7 +17,7 @@ | @@ -17,7 +17,7 @@ | ||
17 | <p><%= _("You won't appear as %s until your account is approved.").html_safe % link_to(_('user'), {:controller => :search, :action => :people, :filter => 'more_recent'}, :target => '_blank') %></p> | 17 | <p><%= _("You won't appear as %s until your account is approved.").html_safe % link_to(_('user'), {:controller => :search, :action => :people, :filter => 'more_recent'}, :target => '_blank') %></p> |
18 | <% end %> | 18 | <% end %> |
19 | <h4><%= _("What to do next?") %></h4> | 19 | <h4><%= _("What to do next?") %></h4> |
20 | - <p><%= _("Access your %s and see your face on the network!") % | 20 | + <p><%= _("Access your %s and see your face on the network!").html_safe % |
21 | (user.present? ? link_to(_('Profile'), {:controller => 'profile', :profile => user.identifier}, :target => '_blank') : 'Profile') %> | 21 | (user.present? ? link_to(_('Profile'), {:controller => 'profile', :profile => user.identifier}, :target => '_blank') : 'Profile') %> |
22 | <%= _("You can also explore your %s to customize your profile. Here are some %s on what you can do there.").html_safe % | 22 | <%= _("You can also explore your %s to customize your profile. Here are some %s on what you can do there.").html_safe % |
23 | [user.present? ? link_to(_('Control Panel'), {:controller => 'profile_editor', :profile => user.identifier}, :target => '_blank') : 'Control Panel', | 23 | [user.present? ? link_to(_('Control Panel'), {:controller => 'profile_editor', :profile => user.identifier}, :target => '_blank') : 'Control Panel', |
@@ -26,5 +26,5 @@ | @@ -26,5 +26,5 @@ | ||
26 | <p><%= _("Learn the guidelines. Read the %s for more details on how to use this social network!").html_safe % link_to(_('Documentation'), {:controller => 'doc'}, :target => '_blank') %></p> | 26 | <p><%= _("Learn the guidelines. Read the %s for more details on how to use this social network!").html_safe % link_to(_('Documentation'), {:controller => 'doc'}, :target => '_blank') %></p> |
27 | <p><%= _("Start exploring and have fun!") %></p> | 27 | <p><%= _("Start exploring and have fun!") %></p> |
28 | <% end %> | 28 | <% end %> |
29 | - <%= render :partial => 'shared/template_welcome_page', :locals => {:template => @person_template, :header => _("What can I do as a %s?")} %> | 29 | + <%= render :partial => 'shared/template_welcome_page', :locals => {:template => @person_template, :header => _("What can I do as a %s?").html_safe} %> |
30 | </div> | 30 | </div> |
app/views/person_notifier/mailer/_profile_comments.html.erb
1 | <% if activity.comments_count > 2 %> | 1 | <% if activity.comments_count > 2 %> |
2 | <div style="font-size: 10px;"> | 2 | <div style="font-size: 10px;"> |
3 | <% if activity.params['url'].blank? %> | 3 | <% if activity.params['url'].blank? %> |
4 | - <%= _("%s comments") % activity.comments_count %> | 4 | + <%= _("%s comments").html_safe % activity.comments_count %> |
5 | <% else %> | 5 | <% else %> |
6 | - <%= link_to(_("View all %s comments") % activity.comments_count, activity.params['url']) %> | 6 | + <%= link_to(_("View all %s comments").html_safe % activity.comments_count, activity.params['url']) %> |
7 | <% end %> | 7 | <% end %> |
8 | </div> | 8 | </div> |
9 | <% else %> | 9 | <% else %> |
app/views/profile/_private_profile.html.erb
@@ -13,5 +13,5 @@ | @@ -13,5 +13,5 @@ | ||
13 | <%= button(:add, content_tag('span', _('Add friend')), profile.add_url, :class => 'add-friend', :title => _("Add friend"), :style => 'position: relative;') %> | 13 | <%= button(:add, content_tag('span', _('Add friend')), profile.add_url, :class => 'add-friend', :title => _("Add friend"), :style => 'position: relative;') %> |
14 | <% end %> | 14 | <% end %> |
15 | <%= button :back, _('Go back'), :back %> | 15 | <%= button :back, _('Go back'), :back %> |
16 | - <%= button :home, _("Go to %s home page") % environment.name, :controller => 'home' %> | 16 | + <%= button :home, _("Go to %s home page").html_safe % environment.name, :controller => 'home' %> |
17 | <% end %> | 17 | <% end %> |
app/views/profile/_profile_comments.html.erb
@@ -5,7 +5,7 @@ | @@ -5,7 +5,7 @@ | ||
5 | <% if activity.comments_count > 0 %> | 5 | <% if activity.comments_count > 0 %> |
6 | <div id="profile-wall-activities-comments-more-<%= activity.id %>" class="profile-wall-activities-comments" > | 6 | <div id="profile-wall-activities-comments-more-<%= activity.id %>" class="profile-wall-activities-comments" > |
7 | <div class='view-all-comments icon-chat'> | 7 | <div class='view-all-comments icon-chat'> |
8 | - <%= link_to(n_('View comment', "View all %s comments", activity.comments_count) % activity.comments_count, :profile => profile.identifier, :controller => 'profile', :action => 'more_comments', :activity => activity, :comment_page => (1)) %> | 8 | + <%= link_to(n_('View comment', "View all %s comments".html_safe, activity.comments_count) % activity.comments_count, :profile => profile.identifier, :controller => 'profile', :action => 'more_comments', :activity => activity, :comment_page => (1)) %> |
9 | </div> | 9 | </div> |
10 | </div> | 10 | </div> |
11 | <% end %> | 11 | <% end %> |
app/views/profile/_profile_scraps.html.erb
@@ -23,7 +23,7 @@ | @@ -23,7 +23,7 @@ | ||
23 | <% if scrap.replies.count > 0 %> | 23 | <% if scrap.replies.count > 0 %> |
24 | <div id="profile-wall-activities-comments-more-<%= activity.id %>" class="profile-wall-activities-comments"> | 24 | <div id="profile-wall-activities-comments-more-<%= activity.id %>" class="profile-wall-activities-comments"> |
25 | <div class='view-all-comments icon-chat'> | 25 | <div class='view-all-comments icon-chat'> |
26 | - <%= link_to(n_('View comment', "View all %s comments", scrap.replies.count) % scrap.replies.count, :profile => profile.identifier, :controller => 'profile', :action => 'more_replies', :activity => activity, :comment_page => (1)) %> | 26 | + <%= link_to(n_('View comment', "View all %s comments".html_safe, scrap.replies.count) % scrap.replies.count, :profile => profile.identifier, :controller => 'profile', :action => 'more_replies', :activity => activity, :comment_page => (1)) %> |
27 | </div> | 27 | </div> |
28 | </div> | 28 | </div> |
29 | <% end %> | 29 | <% end %> |
app/views/profile_editor/edit.html.erb
1 | -<h1><%= _('Profile settings for %s') % profile.name %></h1> | 1 | +<h1><%= _('Profile settings for %s').html_safe % profile.name %></h1> |
2 | 2 | ||
3 | <%= error_messages_for :profile_data %> | 3 | <%= error_messages_for :profile_data %> |
4 | 4 | ||
@@ -18,7 +18,7 @@ | @@ -18,7 +18,7 @@ | ||
18 | </div> | 18 | </div> |
19 | <div id="profile_change_picture"> | 19 | <div id="profile_change_picture"> |
20 | <%= f.fields_for :image_builder, @profile.image do |i| %> | 20 | <%= f.fields_for :image_builder, @profile.image do |i| %> |
21 | - <%= file_field_or_thumbnail(_('Image:'), @profile.image, i) %><%= _("Max size: %s (.jpg, .gif, .png)")% Image.max_size.to_humanreadable %> | 21 | + <%= file_field_or_thumbnail(_('Image:'), @profile.image, i) %><%= _("Max size: %s (.jpg, .gif, .png)").html_safe % Image.max_size.to_humanreadable %> |
22 | <% end %> | 22 | <% end %> |
23 | </div> | 23 | </div> |
24 | 24 |
app/views/search/_search_content.html.erb
1 | <div id='search-content'> | 1 | <div id='search-content'> |
2 | <div class='total'> | 2 | <div class='total'> |
3 | - <%= n_('Total of 1 result', 'Total of %s results', @searches[@asset][:results].total_entries) % @searches[@asset][:results].total_entries.inspect %> | 3 | + <%= n_('Total of 1 result', 'Total of %s results'.html_safe, @searches[@asset][:results].total_entries) % @searches[@asset][:results].total_entries.inspect %> |
4 | </div> | 4 | </div> |
5 | 5 | ||
6 | <%= display_results(@searches, @asset) %> | 6 | <%= display_results(@searches, @asset) %> |
app/views/search/search_page.html.erb
1 | -<%= render :partial => 'search_form', :locals => { :hint => _("Type words about the %s you're looking for") % _(@asset.to_s.singularize) } %> | 1 | +<%= render :partial => 'search_form', :locals => { :hint => _("Type words about the %s you're looking for").html_safe % _(@asset.to_s.singularize) } %> |
2 | <%= render :partial => 'search_content' %> | 2 | <%= render :partial => 'search_content' %> |
3 | 3 | ||
4 | <div style="clear: both"></div> | 4 | <div style="clear: both"></div> |
app/views/shared/_remove_suggestion.html.erb
1 | <%= profile_image suggestion, :thumb, :class => 'suggestion_picture' %> | 1 | <%= profile_image suggestion, :thumb, :class => 'suggestion_picture' %> |
2 | 2 | ||
3 | <p> | 3 | <p> |
4 | -<%= _('Are you sure you want to remove %s from your suggestions list?') % suggestion.name %> | 4 | +<%= _('Are you sure you want to remove %s from your suggestions list?').html_safe % suggestion.name %> |
5 | </p> | 5 | </p> |
6 | 6 | ||
7 | <%= form_tag do %> | 7 | <%= form_tag do %> |
8 | - <%= submit_button(:ok, _("Yes, I want to remove %s") % suggestion.name) %> | 8 | + <%= submit_button(:ok, _("Yes, I want to remove %s").html_safe % suggestion.name) %> |
9 | <%= button(:cancel, _("No"), :action => 'suggest') %> | 9 | <%= button(:cancel, _("No"), :action => 'suggest') %> |
10 | <% end %> | 10 | <% end %> |
app/views/tasks/ticket_details.html.erb
1 | -<h2><%= _('Ticket: %s') % @ticket.name %></h2> | 1 | +<h2><%= _('Ticket: %s').html_safe % @ticket.name %></h2> |
2 | <p><small> | 2 | <p><small> |
3 | - <%= _('Created at %s by %s') % [@ticket.created_at.to_date, link_to(@ticket.requestor.name, @ticket.requestor.url)] %><br/> | ||
4 | - <%= _('Owner: %s') % link_to(@ticket.target.name, @ticket.target.url) %> | 3 | + <%= _('Created at %s by %s').html_safe % [@ticket.created_at.to_date, link_to(@ticket.requestor.name, @ticket.requestor.url)] %><br/> |
4 | + <%= _('Owner: %s').html_safe % link_to(@ticket.target.name, @ticket.target.url) %> | ||
5 | </small></p> | 5 | </small></p> |
6 | 6 | ||
7 | -<p><%= _('Status: %s') % gettext(Task::Status.names[@ticket.status]) %></p> | 7 | +<p><%= _('Status: %s').html_safe % gettext(Task::Status.names[@ticket.status]) %></p> |
8 | 8 | ||
9 | <div> | 9 | <div> |
10 | - <p><%= _('Description: %s') % @ticket.description %></p> | 10 | + <p><%= _('Description: %s').html_safe % @ticket.description %></p> |
11 | </div> | 11 | </div> |
12 | 12 | ||
13 | <% if @ticket.closing_statment %> | 13 | <% if @ticket.closing_statment %> |
14 | - <p><%= _('Closing statement: %s') % @ticket.closing_statment %></p> | 14 | + <p><%= _('Closing statement: %s').html_safe % @ticket.closing_statment %></p> |
15 | <% end %> | 15 | <% end %> |
16 | 16 | ||
17 | <%= button_bar do %> | 17 | <%= button_bar do %> |
app/views/templates/index.html.erb
@@ -10,7 +10,7 @@ | @@ -10,7 +10,7 @@ | ||
10 | <% list_of_templates.each do |title, templates, kind|%> | 10 | <% list_of_templates.each do |title, templates, kind|%> |
11 | <div class='template-kind'> | 11 | <div class='template-kind'> |
12 | <h2><%= title %></h2> | 12 | <h2><%= title %></h2> |
13 | - <%= button :add, _('New...'), {:action => "create_#{kind}_template"}, :title => _("Create a new template for %s") % title.downcase %> | 13 | + <%= button :add, _('New...'), {:action => "create_#{kind}_template"}, :title => _("Create a new template for %s").html_safe % title.downcase %> |
14 | <table class='actions'> | 14 | <table class='actions'> |
15 | <tr> | 15 | <tr> |
16 | <th><%= _('Template') %></th> | 16 | <th><%= _('Template') %></th> |
@@ -20,11 +20,11 @@ | @@ -20,11 +20,11 @@ | ||
20 | <tr> | 20 | <tr> |
21 | <td> | 21 | <td> |
22 | <%#= image_tag "icons-app/#{kind}-icon.png" %> | 22 | <%#= image_tag "icons-app/#{kind}-icon.png" %> |
23 | - <%= link_to(template.name, {:controller => 'profile_editor', :profile => template.identifier}, :title => _('Edit template "%s"') % template.name ) %> | 23 | + <%= link_to(template.name, {:controller => 'profile_editor', :profile => template.identifier}, :title => _('Edit template "%s"').html_safe % template.name ) %> |
24 | <% if environment.is_default_template?(template) %> | 24 | <% if environment.is_default_template?(template) %> |
25 | <%= _('is the default template') %> | 25 | <%= _('is the default template') %> |
26 | <% else %> | 26 | <% else %> |
27 | - <%= link_to(_('Set as default'), {:action => "set_#{kind}_as_default", :template_id => template.id}, :title => _('Set %s template as default') % template.name ) %> | 27 | + <%= link_to(_('Set as default'), {:action => "set_#{kind}_as_default", :template_id => template.id}, :title => _('Set %s template as default').html_safe % template.name ) %> |
28 | <% end %> | 28 | <% end %> |
29 | </td> | 29 | </td> |
30 | <td> | 30 | <td> |
app/views/user_mailer/activation_email_notify.text.erb
1 | -<%= _('Hello %s,') % @name %> | 1 | +<%= _('Hello %s,').html_safe % @name %> |
2 | 2 | ||
3 | -<%= _('Your email %s was just activated.') % [@email] %> | 3 | +<%= _('Your email %s was just activated.').html_safe % [@email] %> |
4 | 4 | ||
5 | <%= _('You can access your e-mail from anywhere, using the following address:') %> | 5 | <%= _('You can access your e-mail from anywhere, using the following address:') %> |
6 | <%= @webmail %> | 6 | <%= @webmail %> |
@@ -8,5 +8,5 @@ | @@ -8,5 +8,5 @@ | ||
8 | <%= _('Greetings,') %> | 8 | <%= _('Greetings,') %> |
9 | 9 | ||
10 | -- | 10 | -- |
11 | -<%= _('%s team.') % @environment.name %> | 11 | +<%= _('%s team.').html_safe % @environment.name %> |
12 | <%= @url %> | 12 | <%= @url %> |