In-Portal Issue Tracker - In-Portal CMS
Viewing Issue Advanced Details
1395 [In-Portal CMS] Email Templates bug report always 2012-09-14 11:10 2012-09-14 11:13
alex  
alex  
normal  
resolved 5.2.0-B1  
fixed  
 
none 5.2.1-B1  
https://groups.google.com/d/topic/in-portal-bugs/sAVoUaUMNZc/discussion
Fixes stripped new lines in plain text e-mails
1
0001395: Too aggressive line ending normalization in plain text e-mails
In In-Portal 5.2.0 release ability to separately enter HTML and Plain-text versions of e-mail was added.
Playing around with this feature I discovered that plain text version of e-mail being severely transformed in terms of line ending before it gets sent to recipient.

Here are the transformations I've found:

1. trailing line endings are replaced with a single line ending
This obviously was designed from HTML version of e-mail since there new line symbols doesn't mean much (unless inside a < pre > tag of course). As a fix I've kept this behavior only for HTML version of e-mail.

2. new lines, produced due m_DefineElement tag execution are removed
This is a bug, but since we only looked at HTML e-mail version where this wasn't noticeable we didn't knew this was happening at all.


To test the fixes I've made I've added "Send" button (visible only in debug mode) to e-mail events list. It just sends an e-mail event. I'm sure that nobody won't be against having this button also commited.
Beware, that not any e-mail event can be sent this way. For example e-mail events that rely on data to be preloaded by code which calls them would just be sent empty.
child of 0001003resolved  (5.2.1)alex Logging engine 
patch plain_text_email_line_ending_problem_fix.patch (7,249) 2012-09-14 11:10
http://tracker.in-portal.org/file_download.php?file_id=1802&type=bug
Issue History
2012-09-14 11:13 alex Changeset attached 5.2.x r15542
2012-09-14 11:13 alex Note Added: 0005179
2012-09-14 11:13 alex Status reviewed and tested => resolved
2012-09-14 11:13 alex Fixed in Version => 5.2.1-B1
2012-09-14 11:13 alex Resolution open => fixed
2012-09-14 11:13 alex Assigned To !COMMUNITY => alex
2012-09-14 11:12 alex Relationship replaced child of 0001003
2012-09-14 11:12 alex Relationship added related to 0001003
2012-09-14 11:12 alex Note Added: 0005178
2012-09-14 11:12 alex Status needs testing => reviewed and tested
2012-09-14 11:12 alex Assigned To => !COMMUNITY
2012-09-14 11:12 alex Developer => alex
2012-09-14 11:12 alex Status active => needs testing
2012-09-14 11:12 alex Reference => https://groups.google.com/d/topic/in-portal-bugs/sAVoUaUMNZc/discussion
2012-09-14 11:12 alex Description Updated bug_revision_view_page.php?rev_id=1043#r1043
2012-09-14 11:11 alex Description Updated bug_revision_view_page.php?rev_id=1042#r1042
2012-09-14 11:10 alex Description Updated bug_revision_view_page.php?rev_id=1041#r1041
2012-09-14 11:10 alex New Issue
2012-09-14 11:10 alex File Added: plain_text_email_line_ending_problem_fix.patch
2012-09-14 11:10 alex Change Log Message => Fixes stripped new lines in plain text e-mails
2012-09-14 11:10 alex Estimate Points => 1

Notes
(0005178)
alex   
2012-09-14 11:12   
Will test all together later.
(0005179)
alex   
2012-09-14 11:13   
Fix committed to 5.2.x branch. Commit Message:

Fixes 0001395: Too aggressive line ending normalization in plain text e-mails