Soft linebreaks don't work due to missing delsp=yes

deviantintegral - November 25, 2008 - 01:41
Project:HTML to text
Version:5.x-1.1
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:needs review
Description

I've now taken over this module from chx. Many thanks to him for his work on this.

In Drupal 6, drupal_mail() sets delsp=yes along with format=flowed. The drupal_html_to_text() function uses this and adds two spaces to the end of every soft-broken line. This means that in the mail clients I've tested (Thunderbird and Mail), lines are unwrapped, but have an extra space. This patch changes the function so that it only inserts 1 space on soft-broken lines.

It's against 1.1, but I need to make a proper HEAD / branch etc for this module.

--Andrew

AttachmentSize
no_delsp_drupal_5.patch1.21 KB

#1

dww - November 25, 2008 - 01:50

I can try this out on a http://socialistworker.org test site, hopefully in the next few days. I use this module there, and have a keen interest in seeing it continue to work correctly. ;)

#2

deviantintegral - November 27, 2008 - 23:52

I discovered that there are hooks which we could use to inject our own headers containing delsp=yes. I still think this is a better solution, as there might be other modules relying on it not being set, but figured I should mention it here as an alternate solution.

 
 

Drupal is a registered trademark of Dries Buytaert.