Skip to content

Commit

Permalink
remove html escaping from all text mails
Browse files Browse the repository at this point in the history
  • Loading branch information
wvengen committed Sep 1, 2014
1 parent 8913ad6 commit 0b08d46
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions app/views/mailer/feedback.text.haml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
= t '.header', user: show_user(@user), date: I18n.l(Time.now, :format => :short)
= raw t '.header', user: show_user(@user), date: I18n.l(Time.now, :format => :short)
\
= @feedback
= raw @feedback
4 changes: 2 additions & 2 deletions app/views/mailer/invite.text.haml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
= t '.text', user: @invite.user.name, mail: @invite.user.email, group: @invite.group.name, link: @link, expires: I18n.l(@invite.expires_at)
= raw t '.text', user: @invite.user.name, mail: @invite.user.email, group: @invite.group.name, link: @link, expires: I18n.l(@invite.expires_at)
-# append english text only if the locale is not english
- if not I18n.locale.to_s.start_with?('en')
=======
\
= t '.text', user: @invite.user.name, mail: @invite.user.email, group: @invite.group.name, link: @link, expires: I18n.l(@invite.expires_at, locale: :en), locale: :en
= raw t '.text', user: @invite.user.name, mail: @invite.user.email, group: @invite.group.name, link: @link, expires: I18n.l(@invite.expires_at, locale: :en), locale: :en
2 changes: 1 addition & 1 deletion app/views/mailer/negative_balance.text.haml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
= raw t '.text', group: h(@group.name), when: format_time(@transaction.created_on), balance: number_to_currency(@group.account_balance), amount: number_to_currency(@transaction.amount), note: h(@transaction.note), user: h(show_user(@transaction.user)), foodcoop: h(FoodsoftConfig[:name])
= raw t '.text', group: @group.name, when: format_time(@transaction.created_on), balance: number_to_currency(@group.account_balance), amount: number_to_currency(@transaction.amount), note: @transaction.note, user: show_user(@transaction.user), foodcoop: FoodsoftConfig[:name]
2 changes: 1 addition & 1 deletion app/views/mailer/not_enough_users_assigned.text.haml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
= t '.text', user: @user.first_name, task: @task.name, when: I18n.l(@task.due_date, format: t('mailer.dateformat')), workgroup_tasks_url: workgroup_tasks_url(workgroup_id: task.workgroup_id), user_tasks_url: user_tasks_url
= raw t '.text', user: @user.first_name, task: @task.name, when: I18n.l(@task.due_date, format: t('mailer.dateformat')), workgroup_tasks_url: workgroup_tasks_url(workgroup_id: task.workgroup_id), user_tasks_url: user_tasks_url
8 changes: 4 additions & 4 deletions app/views/mailer/upcoming_tasks.text.haml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
= t '.text0', user: @user.name, task: @task.name, when: I18n.l(@task.due_date, format: t('mailer.dateformat'))
= raw t '.text0', user: @user.name, task: @task.name, when: I18n.l(@task.due_date, format: t('mailer.dateformat'))
- if @user.next_tasks.size > 0
= t '.nextweek'
= raw t '.nextweek'
- for next_task in @user.next_tasks
- next if next_task == @task
* #{I18n.l next_task.due_date, format: t('mailer.dateformat')} #{next_task.name}
= t '.text1', user_tasks_url: user_tasks_url, foodcoop: FoodsoftConfig[:name]
* #{raw I18n.l next_task.due_date, format: t('mailer.dateformat')} #{raw next_task.name}
= raw t '.text1', user_tasks_url: user_tasks_url, foodcoop: FoodsoftConfig[:name]
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
= @message.body
= raw @message.body
======================================================================
\
= t '.footer', reply_url: new_message_url('message[reply_to]' => @message.id), msg_url: message_url(@message), profile_url: my_profile_url
= raw t '.footer', reply_url: new_message_url('message[reply_to]' => @message.id), msg_url: message_url(@message), profile_url: my_profile_url

0 comments on commit 0b08d46

Please sign in to comment.