[horde] Blank lines in the mail

Jan Schneider jan at horde.org
Wed Jan 20 08:22:18 UTC 2016


Zitat von Michael J Rubinsky <mrubinsk at horde.org>:

> Quoting Ralph Ballier <ballier at mail.schule.de>:
>
>> Zitat von Joao S Veiga <jsveiga at rf.com.br>:
>>
>>> Hi Ralph,
>>>
>>> Attached is the patch file with the changes I made to workaround this in
>>> my system.
>>>
>>> The first part is optional and only reduces the line spacing on the
>>> quoted text style; even not adding blank lines, the style still has
>>> large line spacings.
>>>
>>> The second part just chops off every <o:p></o:p> pair of tags,
>>> introduced by outlook. Yes, it is altering content, but so does the
>>> current situation, which adds lines recursively every time an email is
>>> replied back and forth.
>>>
>>> If you don't know how to apply a patch, or if it does not apply (not
>>> sure if my version is the same as yours):
>>>
>>> - locate the Imp Compose.php file in the server (in my debian
>>> installation, it's in /usr/share/horde/imp/lib),
>>>
>>> - make a backup of it,
>>>
>>> - edit the file and look for the line:
>>>
>>> /* The blockquote tag to use to indicate quoted text in HTML data. */
>>>    const HTML_BLOCKQUOTE = '<blockquote type="cite"
>>> style="border-left:2px solid blue;margin-left:2px;padding-left:12px;">';
>>>
>>> - edit the line adding "line-height: 100%;" to the style so it ends with
>>>
>>> .... padding-left:12px;line-height: 100%;">';
>>>
>>> - now find the function (notice the underline before getMessageText)
>>>
>>>    protected function _getMessageText($contents, array $options =
>> array())
>>>
>>> - locate the line below inside this function:
>>>
>>>    if ($mode == 'html') {
>>>
>>> - and add the following two lines right below it:
>>>
>>>       $msg = str_replace("<o:p></o:p>", "", $msg);
>>>       $msg = str_replace("<o:p> </o:p>", "", $msg);
>>>
>>> - save the file and test replying/forwarding one of the problematic
>>> emails (original from outlook, not one already sent from horde with the
>>> added blank lines).
>>>
>>> Disclaimer: I am not a Horde developer, and this is not endorsed nor
>>> reviewed nor tested by them. I have about 80 users, and it is working
>>> fine, but for other people it may break things, set your server on fire,
>>> and get you in the NSA black list.
>>>
>>> Best regards,
>>> Joao S Veiga
>>
>> Hello Joao,
>>
>> I have applied your patch and it works wonderful!! Thank you very much for
>> this.
>>
>> I hope somebody can integrate this patch in the distribution. Otherwise
>> there is the same problem afte upgrade.
>
> We've already stated such a solution won't be integrated upstream.

Though I'm starting to re-think this. It *is* Outlook's fault, and it  
*is* breaking of standards that we don't have to account for, but  
still it's a major annoyance for end users.
This may be possible to implement as a Horde_Text_Filter that would be  
enabled per user prefs. We already *do* mangle HTML code when  
displaying HTML messages, so this would not be a precedent.

-- 
Jan Schneider
The Horde Project
http://www.horde.org/



More information about the horde mailing list