Fixed not needed html encoding in subject of html emails.
This commit is contained in:
parent
aa51a9a5dc
commit
0e03e6d216
2 changed files with 25 additions and 3 deletions
|
@ -292,7 +292,7 @@ State: i18n(#{ticket.state.name.text2html})<br>
|
||||||
<br>'
|
<br>'
|
||||||
end
|
end
|
||||||
if user.preferences[:locale] =~ /^de/i
|
if user.preferences[:locale] =~ /^de/i
|
||||||
subject = 'Ticket aktualisiert (#{ticket.title.text2html})'
|
subject = 'Ticket aktualisiert (#{ticket.title})'
|
||||||
body = '<div>Hallo #{recipient.firstname.text2html},</div>
|
body = '<div>Hallo #{recipient.firstname.text2html},</div>
|
||||||
<br>
|
<br>
|
||||||
<div>
|
<div>
|
||||||
|
@ -309,7 +309,7 @@ Ticket (#{ticket.title.text2html}) wurde von "<b>#{ticket.updated_by.fullname.te
|
||||||
</div>
|
</div>
|
||||||
'
|
'
|
||||||
else
|
else
|
||||||
subject = 'Updated Ticket (#{ticket.title.text2html})'
|
subject = 'Updated Ticket (#{ticket.title})'
|
||||||
body = '<div>Hi #{recipient.firstname.text2html},</div>
|
body = '<div>Hi #{recipient.firstname.text2html},</div>
|
||||||
<br>
|
<br>
|
||||||
<div>
|
<div>
|
||||||
|
|
|
@ -364,7 +364,7 @@ class TicketNotificationTest < ActiveSupport::TestCase
|
||||||
|
|
||||||
# create ticket in group
|
# create ticket in group
|
||||||
ticket1 = Ticket.create(
|
ticket1 = Ticket.create(
|
||||||
:title => 'some notification template test 1',
|
:title => 'some notification template test 1 Bobs\'s resumé',
|
||||||
:group => Group.lookup( :name => 'Users'),
|
:group => Group.lookup( :name => 'Users'),
|
||||||
:customer => customer,
|
:customer => customer,
|
||||||
:state => Ticket::State.lookup( :name => 'new' ),
|
:state => Ticket::State.lookup( :name => 'new' ),
|
||||||
|
@ -413,6 +413,16 @@ class TicketNotificationTest < ActiveSupport::TestCase
|
||||||
assert_match( /updated/i, template[:subject] )
|
assert_match( /updated/i, template[:subject] )
|
||||||
|
|
||||||
# en notification
|
# en notification
|
||||||
|
subject = NotificationFactory.build(
|
||||||
|
:locale => agent2.preferences[:locale],
|
||||||
|
:string => template[:subject],
|
||||||
|
:objects => {
|
||||||
|
:ticket => ticket1,
|
||||||
|
:article => article,
|
||||||
|
:recipient => agent2,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
assert_match( /Bobs's resumé/, subject )
|
||||||
body = NotificationFactory.build(
|
body = NotificationFactory.build(
|
||||||
:locale => agent2.preferences[:locale],
|
:locale => agent2.preferences[:locale],
|
||||||
:string => template[:body],
|
:string => template[:body],
|
||||||
|
@ -430,6 +440,8 @@ class TicketNotificationTest < ActiveSupport::TestCase
|
||||||
# de template
|
# de template
|
||||||
template = bg.template_update(agent1, ticket1, article, human_changes)
|
template = bg.template_update(agent1, ticket1, article, human_changes)
|
||||||
assert( template[:subject] )
|
assert( template[:subject] )
|
||||||
|
assert( template[:subject] )
|
||||||
|
assert_match( /Bobs's resumé/, template[:subject] )
|
||||||
assert( template[:body] )
|
assert( template[:body] )
|
||||||
assert_match( /Priority/, template[:body] )
|
assert_match( /Priority/, template[:body] )
|
||||||
assert_match( /1 low/, template[:body] )
|
assert_match( /1 low/, template[:body] )
|
||||||
|
@ -437,6 +449,16 @@ class TicketNotificationTest < ActiveSupport::TestCase
|
||||||
assert_match( /aktualis/, template[:subject] )
|
assert_match( /aktualis/, template[:subject] )
|
||||||
|
|
||||||
# de notification
|
# de notification
|
||||||
|
subject = NotificationFactory.build(
|
||||||
|
:locale => agent1.preferences[:locale],
|
||||||
|
:string => template[:subject],
|
||||||
|
:objects => {
|
||||||
|
:ticket => ticket1,
|
||||||
|
:article => article,
|
||||||
|
:recipient => agent2,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
assert_match( /Bobs's resumé/, subject )
|
||||||
body = NotificationFactory.build(
|
body = NotificationFactory.build(
|
||||||
:locale => agent1.preferences[:locale],
|
:locale => agent1.preferences[:locale],
|
||||||
:string => template[:body],
|
:string => template[:body],
|
||||||
|
|
Loading…
Reference in a new issue