ac3cloud / roust

Ruby client for Request Tracker's REST API
Other
6 stars 4 forks source link

Convert \r\r\n to \n so that Mail.new parses it correctly, instead of failing to parse the rest of the item #21

Closed Sarah-E-Greene closed 9 years ago

Sarah-E-Greene commented 9 years ago

Before:

=> "# 28/28 (id/12346/total)\nid: 12346\nTicket: 123\nTimeTaken: 0\nType: Create\nField: \nOldValue: \nNewValue: \nData: \nDescription: Ticket created by fred\nContent: <p>\r\r\n           <ac:macro ac:name=\"toc\"/>\r\r\n         </p>\r\r\n         <p> </p>\r\r\n         <h1>Subject

history = Mail.new(z)
=> #<Mail::Message:70227586303720, Multipart: false, Headers: <# 28/28 (id/12346/total): >, <id: 12346>, <Ticket: 123>, <TimeTaken: 0>, <Type: Create>, <Field: >, <OldValue: >, <NewValue: >, <Data: >, <Description: Ticket created by fred>, <Content: <p>>>

After:

=> "# 28/28 (id/12346/total)\nid: 12346\nTicket: 123\nTimeTaken: 0\nType: Create\nField: \nOldValue: \nNewValue: \nData: \nDescription: Ticket created by fred\nContent: <p>\n           <ac:macro ac:name=\"toc\"/>\n         </p>\n         <p> </p>\n         <h1>Subject...

history = Mail.new(z)
=> #<Mail::Message:70227586303720, Multipart: false, Headers: <# 28/28 (id/12346/total): >, <id: 12346>, <Ticket: 123>, <TimeTaken: 0>, <Type: Create>, <Field: >, <OldValue: >, <NewValue: >, <Data: >, <Description: Ticket created by fred>, <Content: <p> <ac:macro ac:name="toc"/> </p> <p> </p> <h1>Subject...
nerdyness commented 9 years ago

:+1: